niklas.enbom@webrtc.org 2013-07-29 18:37:32 +00:00
parent ea40bd0cc8
commit 7694562805
2 changed files with 6 additions and 8 deletions

View File

@ -19,7 +19,7 @@ using namespace webrtc;
-(void)initCocoaRenderView:(NSOpenGLPixelFormat*)fmt{
self = [super initWithFrame:[self frame] pixelFormat:[fmt autorelease]];
self = [super initWithFrame:[self frame] pixelFormat:fmt];
if (self == nil){
WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, 0, "%s:%d Could not create instance", __FUNCTION__, __LINE__);
@ -39,7 +39,7 @@ using namespace webrtc;
NSRect screenRect = [[NSScreen mainScreen]frame];
// [_windowRef setFrame:screenRect];
// [_windowRef setBounds:screenRect];
self = [super initWithFrame:screenRect pixelFormat:[fmt autorelease]];
self = [super initWithFrame:screenRect pixelFormat:fmt];
if (self == nil){
WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, 0, "%s:%d Could not create instance", __FUNCTION__, __LINE__);

View File

@ -556,7 +556,8 @@ int VideoRenderNSOpenGL::setRenderTargetWindow()
0
};
NSOpenGLPixelFormat* fmt = [[NSOpenGLPixelFormat alloc] initWithAttributes: (NSOpenGLPixelFormatAttribute*) attribs];
NSOpenGLPixelFormat* fmt = [[[NSOpenGLPixelFormat alloc] initWithAttributes:
(NSOpenGLPixelFormatAttribute*) attribs] autorelease];
if(_windowRef)
{
@ -568,8 +569,6 @@ int VideoRenderNSOpenGL::setRenderTargetWindow()
return -1;
}
[fmt release];
_nsglContext = [_windowRef nsOpenGLContext];
[_nsglContext makeCurrentContext];
@ -597,7 +596,8 @@ int VideoRenderNSOpenGL::setRenderTargetFullScreen()
0
};
NSOpenGLPixelFormat* fmt = [[NSOpenGLPixelFormat alloc] initWithAttributes: (NSOpenGLPixelFormatAttribute*) attribs];
NSOpenGLPixelFormat* fmt = [[[NSOpenGLPixelFormat alloc] initWithAttributes:
(NSOpenGLPixelFormatAttribute*) attribs] autorelease];
// Store original superview and frame for use when exiting full screens
_windowRefSuperViewFrame = [_windowRef frame];
@ -624,8 +624,6 @@ int VideoRenderNSOpenGL::setRenderTargetFullScreen()
return -1;
}
[fmt release];
_nsglContext = [_windowRef nsOpenGLContext];
[_nsglContext makeCurrentContext];