mirror of
https://github.com/mpv-player/mpv
synced 2025-01-06 07:00:30 +00:00
video: reduce non-sense messages when playing coverart
Don't print PTS warnings by skipping the normal video path.
This commit is contained in:
parent
b0959488d1
commit
3eaa407c6f
@ -564,16 +564,6 @@ static int update_video(struct MPContext *mpctx, double endpts)
|
|||||||
bool eof = false;
|
bool eof = false;
|
||||||
int r = VD_PROGRESS;
|
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 (mpctx->d_video->header->attached_picture) {
|
||||||
if (vo_has_frame(vo))
|
if (vo_has_frame(vo))
|
||||||
return VD_EOF;
|
return VD_EOF;
|
||||||
@ -581,7 +571,20 @@ static int update_video(struct MPContext *mpctx, double endpts)
|
|||||||
mpctx->video_next_pts = MP_NOPTS_VALUE;
|
mpctx->video_next_pts = MP_NOPTS_VALUE;
|
||||||
return VD_NEW_FRAME;
|
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
|
// On EOF, we write the remaining frames; otherwise we must ensure that
|
||||||
|
Loading…
Reference in New Issue
Block a user