mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
faac: recreate encoder after flushing
... since it appears the existing one can't be bothered anymore to produce some output.
This commit is contained in:
parent
f76b7c9527
commit
5bccb02a90
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue