amcvideodec: Release buffer to Android if allocating output failed
authorSebastian Dröge <sebastian@centricular.com>
Fri, 14 Feb 2014 11:31:29 +0000 (12:31 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Fri, 14 Feb 2014 11:53:56 +0000 (12:53 +0100)
sys/androidmedia/gstamcvideodec.c

index 8ae81e5c4abbee7295ddb6b9d927f55d644b5f8c..7567996fb4532bd1c631aa0baa0ce90707e4c0ca 100644 (file)
@@ -1185,6 +1185,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;
     }