Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
431201da
Commit
431201da
authored
Dec 30, 2009
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vout_macosx: Ensure initialization on main thread.
parent
98fa929d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
modules/video_output/macosx.m
modules/video_output/macosx.m
+11
-4
No files found.
modules/video_output/macosx.m
View file @
431201da
...
...
@@ -132,8 +132,8 @@ static int Open(vlc_object_t *this)
/* Get our main view*/
nsPool
=
[[
NSAutoreleasePool
alloc
]
init
];
sys
->
glView
=
[[
VLCOpenGLVideoView
alloc
]
init
];
[
VLCOpenGLVideoView
performSelectorOnMainThread
:
@selector
(
getNewView
:)
withObject
:
[
NSValue
valueWithPointer
:
&
sys
->
glView
]
waitUntilDone
:
YES
];
if
(
!
sys
->
glView
)
goto
error
;
...
...
@@ -306,12 +306,19 @@ static void OpenglSwap(vout_opengl_t *gl)
#define VLCAssertMainThread() assert([[NSThread currentThread] isMainThread])
+
(
void
)
getNewView
:(
NSValue
*
)
value
{
id
*
ret
=
[
value
pointerValue
];
*
ret
=
[[
self
alloc
]
init
];
}
/**
* Gets called by the Open() method.
* (Non main thread).
*/
-
(
id
)
init
{
VLCAssertMainThread
();
/* Warning - this may be called on non main thread */
NSOpenGLPixelFormatAttribute
attribs
[]
=
...
...
@@ -326,7 +333,7 @@ static void OpenglSwap(vout_opengl_t *gl)
0
};
NSOpenGLPixelFormat
*
fmt
=
[[
NSOpenGLPixelFormat
alloc
]
initWithAttributes
:
attribs
];
NSOpenGLPixelFormat
*
fmt
=
[[
NSOpenGLPixelFormat
alloc
]
initWithAttributes
:
attribs
];
if
(
!
fmt
)
return
nil
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment