changeset 25120:9b4ca4dc1294

Fix a memory leak when working in shared_buffer mode.
author ulion
date Fri, 23 Nov 2007 13:22:21 +0000
parents 2e0a71d7c89f
children 786b99c1ff94
files libvo/vo_macosx.m
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_macosx.m	Fri Nov 23 13:17:36 2007 +0000
+++ b/libvo/vo_macosx.m	Fri Nov 23 13:22:21 2007 +0000
@@ -119,10 +119,11 @@
 			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