From 7971f828de6729928e47aebba1891a6adb34a786 Mon Sep 17 00:00:00 2001 From: Christophe Thommeret Date: Sun, 21 Dec 2008 18:26:02 +0000 Subject: vdpau_h264: release frames at dispose. --- src/libvdpau/dpb.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/libvdpau/dpb.c') diff --git a/src/libvdpau/dpb.c b/src/libvdpau/dpb.c index 12167d393..e397449f9 100644 --- a/src/libvdpau/dpb.c +++ b/src/libvdpau/dpb.c @@ -303,6 +303,21 @@ int dpb_flush(struct dpb *dpb) return 0; } +void dpb_free_all( struct dpb *dpb ) +{ + struct decoded_picture *pic = dpb->pictures; + + if (pic != NULL) + do { + struct decoded_picture *next_pic = pic->next; + free_decoded_picture(pic); + --dpb->used; + pic = next_pic; + } while (pic != NULL); + + printf("dpb_free_all, used: %d\n", dpb->used); +} + void fill_vdpau_reference_list(struct dpb *dpb, VdpReferenceFrameH264 *reflist) { struct decoded_picture *pic = dpb->pictures; -- cgit v1.2.3