Skip to content

hlsdemux2: Various fixes

Edward Hervey requested to merge bilboed/gstreamer:hlsdemux2-lost-sync into main

This is a range of fixes for better handling "broken" stream and fixing discontinuity issues:

  • stream : Fix when the DISCONT flag is set on buffers we are feeding into parsebin. This should only be done on the "first" fragment buffer and not in the middle of a fragment.
  • hlsdemux2: Improve detection of playlist changes (i.e. on which we managed to synchronize, but where the underlying fragments have changed due to a variant switch or a server change), and ensure we set the discont flag on the next fragment we use from that playlist (and not the currently processed one)
  • hlsdemux2: Ensure the stream is marked as DISCONT when we wrongly guesstimated the next fragment
  • hlsdemux2: Increase the tolerance for discontinuity detection. It was too harsh before (not even a frame duration)
  • hlsdemux2: Properly detect the presence of EXT-X-DISCONTINUITY-SEQUENCE
  • hlsdemux2: Fix time resets when re-syncing to a new position failed. This avoids potential massive gaps/hangs in playback
  • hlsdemux2: Be more tolerant when doing matching of segments using PDT
Edited by Edward Hervey

Merge request reports