amcvideodec: Release buffer to Android if allocating output failed

This commit is contained in:
Sebastian Dröge 2014-02-14 12:31:29 +01:00
parent 2476b926b1
commit faf48d26bf

View file

@ -1186,6 +1186,9 @@ retry:
if ((flow_ret = gst_video_decoder_allocate_output_frame (GST_VIDEO_DECODER
(self), frame)) != GST_FLOW_OK) {
GST_ERROR_OBJECT (self, "Failed to allocate buffer");
if (!gst_amc_codec_release_output_buffer (self->codec, idx))
GST_ERROR_OBJECT (self, "Failed to release output buffer index %d",
idx);
goto flow_error;
}