dashdemux: Handle current SIDX before current position in normal mode like in keyunit-only trick mode

Otherwise we'll get into an infinite loop here. Now this is still not
correct and will cause a clean error, but at least it won't hang forever
anymore.
This commit is contained in:
Sebastian Dröge 2017-04-10 18:46:01 +03:00
parent fc0c7d664d
commit 67778ac55e

View file

@ -2865,6 +2865,10 @@ gst_dash_demux_data_received (GstAdaptiveDemux * demux,
/* Drain all bytes, since there might be trailing bytes at the end of subfragment */
buffer =
gst_adapter_take_buffer (dash_stream->sidx_adapter, available);
} else {
if (sidx_end_offset <= dash_stream->sidx_current_offset) {
buffer = NULL;
gst_adapter_clear (dash_stream->sidx_adapter);
} else {
buffer =
gst_adapter_take_buffer (dash_stream->sidx_adapter,
@ -2872,6 +2876,7 @@ gst_dash_demux_data_received (GstAdaptiveDemux * demux,
advance = TRUE;
}
}
}
if (buffer != NULL) {
GST_BUFFER_OFFSET (buffer) = dash_stream->sidx_current_offset;