amcaudiodec: Release buffer back to Android if allocating output fails
authorSebastian Dröge <sebastian@centricular.com>
Fri, 14 Feb 2014 11:28:50 +0000 (12:28 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Fri, 14 Feb 2014 11:51:50 +0000 (12:51 +0100)
sys/androidmedia/gstamcaudiodec.c

index 4bfe732..b400de8 100644 (file)
@@ -784,6 +784,7 @@ failed_allocate:
   {
     GST_ELEMENT_ERROR (self, LIBRARY, SETTINGS, (NULL),
         ("Failed to allocate output buffer"));
+    gst_amc_codec_release_output_buffer (self->codec, idx);
     gst_pad_push_event (GST_AUDIO_DECODER_SRC_PAD (self), gst_event_new_eos ());
     gst_pad_pause_task (GST_AUDIO_DECODER_SRC_PAD (self));
     self->downstream_flow_ret = GST_FLOW_ERROR;