diff options
author | wm4 <wm4@nowhere> | 2014-07-31 21:57:05 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-07-31 21:57:11 +0200 |
commit | de8e9ca9d27969c9bc423282a30a17673f37caa7 (patch) | |
tree | 02f8fb5671e4f5814ca41f26ee17778e67fae32d /player/video.c | |
parent | 4cf3f3ca2ccc05ae9525168182d068bfe743b03f (diff) | |
download | mpv-de8e9ca9d27969c9bc423282a30a17673f37caa7.tar.bz2 mpv-de8e9ca9d27969c9bc423282a30a17673f37caa7.tar.xz |
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.
Diffstat (limited to 'player/video.c')
-rw-r--r-- | player/video.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; |