adaptivedemux2: Don't push out flush events downstream when sync is lost
hlsdemux2
, and therefore adaptivedemux2
, have a feature called lost sync handling
for live streams.
The initial goal was to support the case where we are paused watching a live stream, and when we resume we can no longer resume from the previously downloaded position. In that case we internally do a flushing seek back to the "current live head position". This was also extended since to be able to handle (utterly broken) servers when we can't really figure out where we are anymore and therefore trigger that lost sync
so we can try to get back on our feet.
This does fix the issue... but results in spurious FLUSH_{START|STOP}
events being sent downstream. While that's fine for regular playback scenarios, it's a bit of a wild scenario since a lot of pipelines/applications don't expect such events when it wasn't triggered by downstream/application.
We therefore should only do the flushing internally in such cases