summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-01-27 21:10:11 +0100
committerwm4 <wm4@nowhere>2016-01-27 21:10:11 +0100
commitdea42f77dbf5dedf9d009639da897ef4b3b00c34 (patch)
treec5cec570ed173cf7999ad04345884fd0dd3abedd /player
parentc7ec8fdfe712d3156ccb0cecb2d2c2fa88b64eab (diff)
downloadmpv-dea42f77dbf5dedf9d009639da897ef4b3b00c34.tar.bz2
mpv-dea42f77dbf5dedf9d009639da897ef4b3b00c34.tar.xz
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.
Diffstat (limited to 'player')
-rw-r--r--player/video.c5
1 files changed, 3 insertions, 2 deletions
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 {