mpv/audio/decode
wm4 bd5a02d080 player: detect audio PTS jumps, make video PTS heuristic less aggressive
This is another attempt at making files with sparse video frames work
better.

The problem is that you generally can't know whether a jump in video
timestamps is just a (very) long video frame, or a timestamp reset. Due
to the existence of files with sparse video frames (new frame only every
few seconds or longer), every heuristic will be arbitrary (in general,
at least).

But we can use the fact that if video is continuous, audio should also
be continuous. Audio discontinuities can be easily detected, and if that
happens, reset some of the playback state.

The way the playback state is reset is rather radical (resets decoders
as well), but it's just better not to cause too much obscure stuff to
happen here. If the A/V sync code were to be rewritten, it should
probably strictly use PTS values (not this strange time_frame/delay
stuff), which would make it much easier to detect such situations and
to react to them.
2016-01-09 20:39:28 +01:00
..
ad.h
ad_lavc.c audio: move PTS setting out of the decoder 2015-11-08 17:22:56 +01:00
ad_spdif.c audio: move PTS setting out of the decoder 2015-11-08 17:22:56 +01:00
dec_audio.c player: detect audio PTS jumps, make video PTS heuristic less aggressive 2016-01-09 20:39:28 +01:00
dec_audio.h player: detect audio PTS jumps, make video PTS heuristic less aggressive 2016-01-09 20:39:28 +01:00