summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-08-13 21:55:46 +0200
committerwm4 <wm4@nowhere>2014-08-13 22:01:10 +0200
commit3eaa407c6ff227a4b69b5b81f2a3307dc987fd1c (patch)
tree1a8008aab1aac7a0221b1e1c1999436b659c23ce
parentb0959488d104fa011ec9a267569d101769e1fb1e (diff)
downloadmpv-3eaa407c6ff227a4b69b5b81f2a3307dc987fd1c.tar.bz2
mpv-3eaa407c6ff227a4b69b5b81f2a3307dc987fd1c.tar.xz
video: reduce non-sense messages when playing coverart
Don't print PTS warnings by skipping the normal video path.
-rw-r--r--player/video.c25
1 files changed, 14 insertions, 11 deletions
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