changeset 29751:593354e0500d

Free memory allocated in ff_vdpau_add_data_chunk() on uninit.
author cehoyos
date Thu, 22 Oct 2009 18:44:39 +0000
parents 0767ef7f6ca2
children a1da895d9947
files libvo/vo_vdpau.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_vdpau.c	Thu Oct 22 15:40:04 2009 +0000
+++ b/libvo/vo_vdpau.c	Thu Oct 22 18:44:39 2009 +0000
@@ -1111,10 +1111,18 @@
 
 static void uninit(void)
 {
+    int i;
+
     if (!vo_config_count)
         return;
     visible_buf = 0;
 
+    for (i = 0; i < MAX_VIDEO_SURFACES; i++) {
+        // Allocated in ff_vdpau_add_data_chunk()
+        av_freep(&surface_render[i].bitstream_buffers);
+        surface_render[i].bitstream_buffers_allocated = 0;
+    }
+
     /* Destroy all vdpau objects */
     DestroyVdpauObjects();