From df036d0bf5d30ecc1b360ec6861e26c19c9ba075 Mon Sep 17 00:00:00 2001 From: ulion Date: Fri, 23 Nov 2007 13:22:21 +0000 Subject: [PATCH] Fix a memory leak when working in shared_buffer mode. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25148 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_macosx.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libvo/vo_macosx.m b/libvo/vo_macosx.m index 7cf846b7c5..ebcf3eb1e3 100644 --- a/libvo/vo_macosx.m +++ b/libvo/vo_macosx.m @@ -119,10 +119,11 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ break; } image_bytes = (image_depth + 7) / 8; - image_data = malloc(image_width*image_height*image_bytes); if(!shared_buffer) { + image_data = malloc(image_width*image_height*image_bytes); + monitor_aspect = (float)screen_frame.size.width/(float)screen_frame.size.height; //set aspect