From dea42f77dbf5dedf9d009639da897ef4b3b00c34 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 27 Jan 2016 21:10:11 +0100 Subject: video: fix coverart switching If cover art is re-enabled during playback, the covert art picture (which has pts==0) will be discarded. Add another corner case to the list. --- player/video.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'player/video.c') diff --git a/player/video.c b/player/video.c index c247629ed3..bee6cd5cb0 100644 --- a/player/video.c +++ b/player/video.c @@ -698,7 +698,8 @@ static int video_output_image(struct MPContext *mpctx, double endpts) bool hrseek = mpctx->hrseek_active && mpctx->video_status == STATUS_SYNCING; struct track *track = mpctx->current_track[0][STREAM_VIDEO]; - if (track && track->stream && track->stream->attached_picture) { + bool is_coverart = track && track->stream && track->stream->attached_picture; + if (is_coverart) { if (vo_has_frame(mpctx->video_out)) return VD_EOF; hrseek = false; @@ -728,7 +729,7 @@ static int video_output_image(struct MPContext *mpctx, double endpts) mp_image_setrefp(&mpctx->saved_frame, img); } else if (mpctx->video_status == STATUS_SYNCING && mpctx->playback_pts != MP_NOPTS_VALUE && - img->pts < mpctx->playback_pts) + img->pts < mpctx->playback_pts && !is_coverart) { /* skip after stream-switching */ } else { -- cgit v1.2.3