mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 11:55:39 +00:00
hlsdemux2: Increase tolerance for discontinuity detection
A lot of streams will do a poor job of estimating proper duration of fragments in the playlist, but over several fragments have it correct. Instead of constantly trying to realign the estimated stream time, allow for a more realistic tolerance of 3-4 video frames Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6610>
This commit is contained in:
parent
8b6e7a018c
commit
d2b3262b71
1 changed files with 3 additions and 1 deletions
|
@ -563,7 +563,9 @@ gst_hlsdemux_stream_handle_internal_time (GstHLSDemuxStream * hls_stream,
|
|||
" difference against expected : %" GST_STIME_FORMAT,
|
||||
GST_STIME_ARGS (real_stream_time), GST_STIME_ARGS (difference));
|
||||
|
||||
if (ABS (difference) > 10 * GST_MSECOND) {
|
||||
/* We allow a tolerance of 3-4 frames between the estimated and observed
|
||||
* stream time. */
|
||||
if (ABS (difference) > 100 * GST_MSECOND) {
|
||||
GstClockTimeDiff wrong_position_threshold =
|
||||
hls_stream->current_segment->duration / 2;
|
||||
|
||||
|
|
Loading…
Reference in a new issue