From 4a8b396b31237c81647d34b575ba69f00ec7148d Mon Sep 17 00:00:00 2001 From: cehoyos Date: Thu, 22 Oct 2009 18:44:39 +0000 Subject: [PATCH] Free memory allocated in ff_vdpau_add_data_chunk() on uninit. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29793 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_vdpau.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libvo/vo_vdpau.c b/libvo/vo_vdpau.c index 26d643f42a..a179caec96 100644 --- a/libvo/vo_vdpau.c +++ b/libvo/vo_vdpau.c @@ -1111,10 +1111,18 @@ static void DestroyVdpauObjects(void) 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(); -- 2.11.4.GIT