1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-18 12:55:16 +00:00
mpv/player
wm4 0cce8fe64f audio: fix A/V sync in encoding mode
In encoding mode, the AO pretends to be infinitely fast (it will take
whatever we write, without ever rejecting input). Commit 261506e3 broke
this somehow. It turns out an old hack dealing with this was accidentally
dropped.

This is the hunk of code whose semantics were (partially) dropped:

    if (mpctx->d_audio && (mpctx->restart_playback ? !video_left :
                           ao_untimed(mpctx->ao) && (mpctx->delay <= 0 ||
                                                     !video_left)))
    {
        int status = fill_audio_out_buffers(mpctx, endpts);
        // Not at audio stream EOF yet
        audio_left = status > -2;
    }

This if condition is pretty wild, and it looked like it was pretty much
for audio-only mode, rather than subtle handling for encoding mode.
2014-07-31 04:49:44 +02:00
..
lua osc: Do precise seeks on simple clicks on seekbar 2014-07-29 19:26:32 +02:00
timeline demux: make start time a simple field 2014-07-05 17:07:15 +02:00
audio.c audio: fix A/V sync in encoding mode 2014-07-31 04:49:44 +02:00
client.c client API: fix deadlock when calling mpv_terminate_destroy before init 2014-07-31 03:12:18 +02:00
client.h Add more const 2014-06-11 00:39:14 +02:00
command.c client API: don't send internal events to the clients 2014-07-31 04:35:23 +02:00
command.h client API: make "cache" property and similar observable 2014-07-31 04:19:41 +02:00
configfiles.c Revert "Remove DVD and Bluray support" 2014-07-15 01:49:02 +02:00
core.h client API: make "cache" property and similar observable 2014-07-31 04:19:41 +02:00
discnav.c demux: add a demuxer thread 2014-07-16 23:25:56 +02:00
loadfile.c player: split seek_reset() 2014-07-30 23:29:00 +02:00
lua.c build: include <strings.h> for strcasecmp() 2014-07-10 08:29:32 +02:00
main_fn.c build: add option to build a library 2014-02-10 21:25:22 +01:00
main.c Audit and replace all ctype.h uses 2014-07-01 23:11:08 +02:00
misc.c player: fix desync when seeking and switching external tracks 2014-07-29 17:55:28 +02:00
osd.c osd: properly handle OSD bar timeout 2014-07-21 19:35:20 +02:00
playloop.c client API: make "cache" property and similar observable 2014-07-31 04:19:41 +02:00
screenshot.c player: make the time display relative to start PTS 2014-06-29 20:39:49 +02:00
screenshot.h
scripting.c build: include <strings.h> for strcasecmp() 2014-07-10 08:29:32 +02:00
sub.c player: split seek_reset() 2014-07-30 23:29:00 +02:00
video.c player: move video display code out of the playloop 2014-07-30 23:29:00 +02:00