From f104ef12827278c5620b57a34d066b333bbdfa32 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 25 Aug 2014 21:28:56 +0200 Subject: player: minor changes This shouldn't change anything functionally. Change the A/V desync message. --framedrop is enabled by default now, so the text must be changed a little. I've never heard of audio outputs messing up A/V sync recently, so remove that part. Remove the unused ao_pts field. Reorder 2 A/V sync related expressions so that they look the same. --- player/audio.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'player/audio.c') diff --git a/player/audio.c b/player/audio.c index a044a422cc..cc5629a6e6 100644 --- a/player/audio.c +++ b/player/audio.c @@ -276,7 +276,6 @@ static int write_to_ao(struct MPContext *mpctx, struct mp_audio *data, int flags struct ao *ao = mpctx->ao; struct mp_audio out_format; ao_get_format(ao, &out_format); - mpctx->ao_pts = pts; #if HAVE_ENCODING encode_lavc_set_audio_pts(mpctx->encode_lavc_ctx, playing_audio_pts(mpctx)); #endif @@ -288,9 +287,6 @@ static int write_to_ao(struct MPContext *mpctx, struct mp_audio *data, int flags if (played > 0) { mpctx->shown_aframes += played; mpctx->delay += played / real_samplerate; - // Keep correct pts for remaining data - could be used to flush - // remaining buffer when closing ao. - mpctx->ao_pts += played / real_samplerate; return played; } return 0; @@ -343,7 +339,7 @@ static bool get_sync_samples(struct MPContext *mpctx, int *skip) } if (sync_to_video) - sync_pts += mpctx->delay - mpctx->audio_delay; + sync_pts -= mpctx->audio_delay - mpctx->delay; double ptsdiff = written_pts - sync_pts; // Missing timestamp, or PTS reset, or just broken. -- cgit v1.2.3