diff options
author | wm4 <wm4@nowhere> | 2018-01-17 07:07:15 +0100 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2018-01-18 01:25:53 -0800 |
commit | 082029f8503f68c903ec6eda4bf4e37cc0065760 (patch) | |
tree | 778708f90951a8a50f526a163d360925c381c6a0 /osdep/main-fn.h | |
parent | ca67928d7ab176c080a7e99f0d4ce0c5d1070844 (diff) | |
download | mpv-082029f8503f68c903ec6eda4bf4e37cc0065760.tar.bz2 mpv-082029f8503f68c903ec6eda4bf4e37cc0065760.tar.xz |
player: redo hack for video keyframe seeks with external audio
If you play a video with an external audio track, and do backwards
keyframe seeks, then audio can be missing. This is because a backwards
seek can end up way before the seek target (this is just how this seek
mode works). The audio file will be seeked at the correct seek target
(since audio usually has a much higher seek granularity), which results
in silence being played until the video reaches the originally intended
seek target.
There was a hack in audio.c to deal with this. Replace it with a
different hack. The new hack probably works about as well as the old
hack, except it doesn't add weird crap to the audio resync path (which
is some of the worst code here, so this is some nice preparation for
rewriting it). As a more practical advantage, it doesn't discard the
audio demuxer packet cache. The old code did, which probably ruined
seeking in youtube DASH streams.
A non-hacky solution would be handling external files in the demuxer
layer. Then chaining the seeks would be pretty easy. But we're pretty
far from that, because it would either require intrusive changes to the
demuxer layer, or wouldn't be flexible enough to load/unload external
files at runtime. Maybe later.
Diffstat (limited to 'osdep/main-fn.h')
0 files changed, 0 insertions, 0 deletions