changeset 28204:ec9c4610f10f

Fix deinit problem due to r28215 original thread: date: Fri, Jan 2, 2009 at 10:00 PM subject: [PATCH] Fix deinit problem due to r28215 (was Re: [MPlayer-cvslog] r28215 - in trunk: DOCS/man/en/mplayer.1 libvo/vo_macosx.m)
author gpoirier
date Sat, 03 Jan 2009 22:33:04 +0000
parents e6e0560eb50d
children ddbc84ded0c7
files libvo/vo_macosx.m
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_macosx.m	Sat Jan 03 02:15:07 2009 +0000
+++ b/libvo/vo_macosx.m	Sat Jan 03 22:33:04 2009 +0000
@@ -337,7 +337,7 @@
 	// set defaults
 	screen_id = 0;
 	shared_buffer = false;
-	buffer_name = DEFAULT_BUFFER_NAME;
+	buffer_name = NULL;
 	
 	if (subopt_parse(arg, subopts) != 0) {
 		mp_msg(MSGT_VO, MSGL_FATAL,
@@ -361,7 +361,9 @@
 	NSApp = [NSApplication sharedApplication];
 	isLeopardOrLater = floor(NSAppKitVersionNumber) > 824;
 	
-	if (strcmp(buffer_name, DEFAULT_BUFFER_NAME))
+	if (!buffer_name)
+		buffer_name = strdup(DEFAULT_BUFFER_NAME);
+	else
 		shared_buffer = true;
 	
 	if(!shared_buffer)