[MPlayer-dev-eng] [PATCH suppress compiler warning

Zongyao Qu zongyao.qu at gmail.com
Wed Oct 10 14:02:21 CEST 2012


the API stringWithCString is deprecated since 10.4

we should use new ones.


diff --git libvo/vo_corevideo.m libvo/vo_corevideo.m
index 6ef9c0193a0763a7ef362d71e4f56ab4b4261f09..f2cb45d2
23d071b41b07f9ede74a643e51008557 100644
--- libvo/vo_corevideo.m
+++ libvo/vo_corevideo.m
@@ -162,7 +162,7 @@ static int config(uint32_t width, uint32_t
 height, uint32_t d_width, uint32_t d_
 		//config OpenGL View
 		[mpGLView config:d_width:d_height:flags];
 		[mpGLView reshape];
-		[[mpGLView window] setTitle:[NSString stringWithCString:
vo_wintitle ? vo_wintitle : title]];
+		[[mpGLView window] setTitle:[NSString stringWithUTF8St
ring:vo_wintitle ? vo_wintitle : title]];
 	}
 	else
 	{
@@ -202,7 +202,7 @@ static int config(uint32_t width, uint32_t 
height, uint32_t d_width, uint32_t d_
 		}
 
 		//connect to mplayerosx
-		mplayerosxProxy=[NSConnection rootProxyForConnectio
nWithRegisteredName:[NSString stringWithCString:buffer_name] host:nil];
+		mplayerosxProxy=[NSConnection rootProxyForConnection
WithRegisteredName:[NSString stringWithUTF8String:buffer_name] host:nil];
 		if ([mplayerosxProxy conformsToProtocol:@protocol(MPlayerOSXV
OProto)]) {
 			[mplayerosxProxy setProtocolForProxy:@protocol(MPlayerOSX
VOProto)];
 			mplayerosxProto = (id <MPlayerOSXVOProto>)mplayerosxPro
xy;




More information about the MPlayer-dev-eng mailing list