From 3eaa407c6ff227a4b69b5b81f2a3307dc987fd1c Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Aug 2014 21:55:46 +0200 Subject: video: reduce non-sense messages when playing coverart Don't print PTS warnings by skipping the normal video path. --- player/video.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'player/video.c') diff --git a/player/video.c b/player/video.c index 27cb2bebab..43b51bfd58 100644 --- a/player/video.c +++ b/player/video.c @@ -564,16 +564,6 @@ static int update_video(struct MPContext *mpctx, double endpts) bool eof = false; int r = VD_PROGRESS; - // Already enough video buffered? - bool vo_framedrop = !!mpctx->video_out->driver->flip_page_timed; - int min_frames = vo_framedrop ? 2 : 1; // framedrop needs duration - if (!mpctx->next_frame[min_frames - 1]) { - r = video_output_image(mpctx, endpts); - if (r < 0 || r == VD_WAIT) - return r; - eof = r == VD_EOF; - } - if (mpctx->d_video->header->attached_picture) { if (vo_has_frame(vo)) return VD_EOF; @@ -581,7 +571,20 @@ static int update_video(struct MPContext *mpctx, double endpts) mpctx->video_next_pts = MP_NOPTS_VALUE; return VD_NEW_FRAME; } - return VD_PROGRESS; + r = video_output_image(mpctx, MP_NOPTS_VALUE); + return r <= 0 ? VD_EOF: VD_PROGRESS; + } + + + bool vo_framedrop = !!mpctx->video_out->driver->flip_page_timed; + int min_frames = vo_framedrop ? 2 : 1; // framedrop needs duration + + // Already enough video buffered? + if (!mpctx->next_frame[min_frames - 1]) { + r = video_output_image(mpctx, endpts); + if (r < 0 || r == VD_WAIT) + return r; + eof = r == VD_EOF; } // On EOF, we write the remaining frames; otherwise we must ensure that -- cgit v1.2.3