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
@ -691,6 +691,13 @@ gst_faac_handle_frame (GstAudioEncoder * enc, GstBuffer * in_buf)
|
|||||||
ret = gst_audio_encoder_finish_frame (enc, out_buf, faac->samples);
|
ret = gst_audio_encoder_finish_frame (enc, out_buf, faac->samples);
|
||||||
} else {
|
} else {
|
||||||
gst_buffer_unref (out_buf);
|
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;
|
return ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user