summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-30 21:26:29 +0100
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2015-02-03 14:36:36 +0900
commit20246a0df3be0fd16625dd825bb7f18670103696 (patch)
tree0b14ed4b7fada8a5d01dfcc77337b70160720d14
parentd0c3df3276d93b2d00240e169d7e7a861ed7f79e (diff)
downloadmpv-20246a0df3be0fd16625dd825bb7f18670103696.tar.bz2
mpv-20246a0df3be0fd16625dd825bb7f18670103696.tar.xz
player: print desync message on negative A/V-sync too
At least there is _some_ problem if this happens. It would mean that audio is playing slower than video. Normally, video is synced to audio, so if audio stops playback completely, video will not advance at all. But using things like --autosync, it's well possible that this kind of desync happens.
-rw-r--r--player/video.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/player/video.c b/player/video.c
index 0e142ddd0d..f819a935c6 100644
--- a/player/video.c
+++ b/player/video.c
@@ -696,7 +696,7 @@ static void update_avsync_after_frame(struct MPContext *mpctx)
mpctx->time_frame * mpctx->opts->playback_speed;
if (a_pos == MP_NOPTS_VALUE || mpctx->video_pts == MP_NOPTS_VALUE)
mpctx->last_av_difference = MP_NOPTS_VALUE;
- if (mpctx->last_av_difference > 0.5 && !mpctx->drop_message_shown) {
+ if (fabs(mpctx->last_av_difference) > 0.5 && !mpctx->drop_message_shown) {
MP_WARN(mpctx, "%s", av_desync_help_text);
mpctx->drop_message_shown = true;
}