From 8665dba961523e99545407c3a114af04ac0f06fe Mon Sep 17 00:00:00 2001 From: Julian Scheel Date: Sat, 24 Apr 2010 21:54:26 +0200 Subject: fix previous commit, it discared frames too early --- src/video_dec/libvdpau/dpb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/video_dec/libvdpau/dpb.c b/src/video_dec/libvdpau/dpb.c index 1bdb06b27..79cd35db3 100644 --- a/src/video_dec/libvdpau/dpb.c +++ b/src/video_dec/libvdpau/dpb.c @@ -467,10 +467,10 @@ int dpb_add_picture(struct dpb *dpb, struct decoded_picture *pic, uint32_t num_r } } while (pic != NULL && (pic = pic->next) != NULL); - /* if all pictured in dpb are marked as delayed for output + /* if all pictures in dpb are marked as delayed for output * we need to drop a not yet drawn image. take the oldest one */ - if(!discard_ref) { + if(i > num_ref_frames && !discard_ref) { discard_ref = dpb->pictures; } } -- cgit v1.2.3