mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 11:32:38 +00:00
hlsdemux: flush the adapter in the end of a fragment
In case of error there might be some data left in the adapter when EOS is received. Clear the adapter to be able to restart again later if requested.
This commit is contained in:
parent
4ab1d9f21f
commit
bb8887baa7
1 changed files with 6 additions and 1 deletions
|
@ -943,7 +943,12 @@ _src_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
|||
case GST_EVENT_EOS:
|
||||
if (demux->current_key)
|
||||
gst_hls_demux_decrypt_end (demux);
|
||||
/* TODO adapter should be empty */
|
||||
|
||||
/* ideally this should be empty, but this eos might have been
|
||||
* caused by an error on the source element */
|
||||
GST_DEBUG_OBJECT (demux, "Data still on the adapter when EOS was received"
|
||||
": %" G_GSIZE_FORMAT, gst_adapter_available (demux->adapter));
|
||||
gst_adapter_clear (demux->adapter);
|
||||
|
||||
/* pending buffer is only used for encrypted streams */
|
||||
if (demux->pending_buffer) {
|
||||
|
|
Loading…
Reference in a new issue