path: root/player/video.c
diff options
authorwm4 <wm4@nowhere>2014-08-25 21:28:56 +0200
committerwm4 <wm4@nowhere>2014-08-25 21:39:24 +0200
commitf104ef12827278c5620b57a34d066b333bbdfa32 (patch)
treecbdffdf6c6a265b49c18130546f34578f06e471f /player/video.c
parentf4ccf22e1695e89fb6fcf97f92fc492a2bdc5b97 (diff)
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.
Diffstat (limited to 'player/video.c')
1 files changed, 3 insertions, 8 deletions
diff --git a/player/video.c b/player/video.c
index 391d2c02bd..7aaef07f4f 100644
--- a/player/video.c
+++ b/player/video.c
@@ -66,13 +66,9 @@ static const char av_desync_help_text[] =
"Possible reasons, problems, workarounds:\n"
"- Your system is simply too slow for this file.\n"
" Transcode it to a lower bitrate file with tools like HandBrake.\n"
-"- Broken/buggy _audio_ driver.\n"
-" Experiment with different values for --autosync, 30 is a good start.\n"
-" If you have PulseAudio, try --ao=alsa .\n"
"- Slow video output.\n"
-" Try a different --vo driver (--vo=help for a list) or try --framedrop!\n"
-"- Playing a video file with --vo=opengl with higher FPS than the monitor.\n"
-" This is due to vsync limiting the framerate.\n"
+" Try a different --vo driver (--vo=help for a list). Make sure framedrop\n"
+" is not disabled, or experiment with different values for --framedrop.\n"
"- Playing from a slow network source.\n"
" Download the file instead.\n"
"- Try to find out whether audio/video/subs are causing this by experimenting\n"
@@ -473,9 +469,8 @@ static void adjust_sync(struct MPContext *mpctx, double v_pts, double frame_time
if (mpctx->audio_status != STATUS_PLAYING)
- double a_pts = written_audio_pts(mpctx) - mpctx->delay;
+ double a_pts = written_audio_pts(mpctx) + mpctx->audio_delay - mpctx->delay;
double av_delay = a_pts - v_pts;
- av_delay += mpctx->audio_delay; // This much pts difference is desired
double change = av_delay * 0.1;
double max_change = opts->default_max_pts_correction >= 0 ?