From de8e9ca9d27969c9bc423282a30a17673f37caa7 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 31 Jul 2014 21:57:05 +0200 Subject: video: fix attached picture mode Playing audio files with embedded cover art broke due to some of the recent changes. Treat video EOF properly, and don't burn the CPU. Disable hrseek for video in attached picture mode, since the decoder will always produce a new image, which makes hrseek never terminate. Fixes #970. --- player/video.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'player/video.c') diff --git a/player/video.c b/player/video.c index eea8fba124..7d33538627 100644 --- a/player/video.c +++ b/player/video.c @@ -505,7 +505,8 @@ static int video_output_image(struct MPContext *mpctx, double endpts, add_frame_pts(mpctx, pts); bool drop = false; - bool hrseek = mpctx->hrseek_active && mpctx->video_status == STATUS_SYNCING; + bool hrseek = mpctx->hrseek_active && mpctx->video_status == STATUS_SYNCING + && !mpctx->d_video->header->attached_picture; if (hrseek && pts < mpctx->hrseek_pts - .005) drop = true; if (endpts != MP_NOPTS_VALUE && pts >= endpts) { @@ -751,6 +752,7 @@ void write_video(struct MPContext *mpctx, double endpts) mpctx->last_av_difference = 0; mpctx->video_status = STATUS_EOF; MP_VERBOSE(mpctx, "video EOF\n"); + return; } else { if (mpctx->video_status > STATUS_PLAYING) mpctx->video_status = STATUS_PLAYING; -- cgit v1.2.3