From 2f2b3f8d5c614090b5d168b05d22021ae7b0ca92 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 22 May 2014 13:50:10 +0200 Subject: video: fix display of cover art with vo_vdpau vo_vdpau currently has a video queue larger than 1 entry, which causes the video display code to never queue display the video frame. This is because we consider cover art an endless stream of frames decoded from the same source packet, and include special logic to actually only decode and display 1 frame. Also, make decode_image() also signal EOF in the cover art case. --- player/video.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/player/video.c b/player/video.c index dad8aaaf84..50f0956f1e 100644 --- a/player/video.c +++ b/player/video.c @@ -311,7 +311,7 @@ static int decode_image(struct MPContext *mpctx) if (d_video->header->attached_picture) { d_video->waiting_decoded_mpi = video_decode(d_video, d_video->header->attached_picture, 0); - return 1; + return 0; } struct demux_packet *pkt = demux_read_packet(d_video->header); @@ -516,8 +516,10 @@ int update_video(struct MPContext *mpctx, double endpts, bool reconfig_ok, struct vo *video_out = mpctx->video_out; if (mpctx->d_video->header->attached_picture) { - if (video_out->hasframe || vo_has_next_frame(video_out, true)) + if (video_out->hasframe) return 0; + if (vo_has_next_frame(video_out, true)) + return 2; } int r = video_output_image(mpctx, endpts, reconfig_ok); -- cgit v1.2.3