0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00
mpv/player
wm4 259f219438 player: gross hack to improve non-hr seeking with external audio tracks
Relative seeks backwards with external audio tracks does not always work
well: it tends to happen that video seek back further than audio, so
audio will remain silent until the audio's after-seek position is
reached. This happens because we strictly seek both video and audio
demuxer to the approximate desirted target PTS, and then start decoding
from that.

Commit 81358380 removes an older method that was supposed to deal with
this. It was sort of bad, because it could lead to the playback core
freezing by waiting on network.

Ideally, the demuxer layer would probably somehow deal with such seeks,
and do them in a way the audio is seeked after video. Currently this is
infeasible, because the demuxer layer assumes a single demuxer, and
external tracks simply use separate demuxer layers. (MPlayer actually
had a pseudo-demuxer that joined external tracks into a single demuxer,
but this is not flexible enough - and also, the demuxer layer as it
currently exists can't deal with dynamically removing external tracks
either. Maybe some time in the future.)

Instead, add a gross hack, that essentially reseeks the audio if it
detects that it's too far off. The result is actually not too bad,
because we can reuse the mechanism that is used for instant track
switching. This way we can make sure of the right position, without
having to care about certain other issues.

It should be noted that if the audio demuxer is used for other tracks
too, and the demuxer does not support refresh seeking, audio will
probably be off by even a higher amount. But this should be rare.
2016-08-07 16:29:13 +02:00
..
lua ytdl: Error out with http_dash_segments 2016-07-30 19:02:39 +02:00
audio.c player: gross hack to improve non-hr seeking with external audio tracks 2016-08-07 16:29:13 +02:00
client.c build: silence -Wunused-result 2016-06-07 14:12:33 +02:00
client.h global: add client API pointer to library handle 2016-01-15 22:54:08 +01:00
command.c audio: refactor mixer code and delete mixer.c 2016-07-17 19:21:28 +02:00
command.h player: rewrite deinterlace filter auto-insertion 2016-07-05 21:10:26 +02:00
configfiles.c audio: drop --softvol=no and --softvol=auto 2016-07-09 18:31:18 +02:00
core.h player: gross hack to improve non-hr seeking with external audio tracks 2016-08-07 16:29:13 +02:00
external_files.c ta: remove old and redundant macro 2016-05-17 10:53:14 +02:00
external_files.h player: rename and move find_subfiles.c 2015-09-20 18:05:06 +02:00
lavfi.c lavfi: shut up false positive compiler warnings 2016-04-26 19:38:51 +02:00
lavfi.h player: add complex filter graph support 2016-02-05 23:19:56 +01:00
loadfile.c player: improve instant track switching 2016-08-06 15:47:04 +02:00
lua.c osd: cleanup: make OSDTYPE_ constants private to OSD code 2016-03-08 22:01:57 +01:00
main.c audio: use --audio-channels=auto behavior, except on ALSA 2016-08-04 20:49:20 +02:00
misc.c player: offset demuxer on start/seek properly with audio/sub delay 2016-08-04 11:26:57 +02:00
osd.c player: do not cut off terminal status line if it contains newlines 2016-07-15 18:58:36 +02:00
playloop.c player: gross hack to improve non-hr seeking with external audio tracks 2016-08-07 16:29:13 +02:00
screenshot.c video: refactor how VO exports hwdec device handles 2016-05-09 20:03:22 +02:00
screenshot.h Relicense some non-MPlayer source files to LGPL 2.1 or later 2016-01-19 18:36:06 +01:00
scripting.c Relicense some non-MPlayer source files to LGPL 2.1 or later 2016-01-19 18:36:06 +01:00
sub.c osd: cleanup: make OSDTYPE_ constants private to OSD code 2016-03-08 22:01:57 +01:00
video.c player: fix display-sync timing if audio take long on resume 2016-08-07 14:14:32 +02:00