From: Mark Nauwelaerts Date: Thu, 22 Dec 2011 16:15:28 +0000 (+0100) Subject: faac: recreate encoder after flushing X-Git-Tag: RELEASE-0.11.1~124^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5bccb02a90f0a529522d9a598f794122d5afaa09;p=platform%2Fupstream%2Fgst-plugins-bad.git faac: recreate encoder after flushing ... since it appears the existing one can't be bothered anymore to produce some output. --- diff --git a/ext/faac/gstfaac.c b/ext/faac/gstfaac.c index 95f4909..68c1e01 100644 --- a/ext/faac/gstfaac.c +++ b/ext/faac/gstfaac.c @@ -691,6 +691,13 @@ gst_faac_handle_frame (GstAudioEncoder * enc, GstBuffer * in_buf) ret = gst_audio_encoder_finish_frame (enc, out_buf, faac->samples); } else { gst_buffer_unref (out_buf); + /* re-create encoder after final flush */ + if (!in_buf) { + GST_DEBUG_OBJECT (faac, "flushed; recreating encoder"); + gst_faac_close_encoder (faac); + if (!gst_faac_open_encoder (faac)) + ret = GST_FLOW_ERROR; + } } return ret;