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

@ -2866,10 +2866,15 @@ gst_dash_demux_data_received (GstAdaptiveDemux * demux,
buffer =
gst_adapter_take_buffer (dash_stream->sidx_adapter, available);
} else {
buffer =
gst_adapter_take_buffer (dash_stream->sidx_adapter,
sidx_end_offset - dash_stream->sidx_current_offset);
advance = TRUE;
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,
sidx_end_offset - dash_stream->sidx_current_offset);
advance = TRUE;
}
}
}