Skip to content
Snippets Groups Projects
Commit abe88754 authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

player: protect play against calls from the main thread

parent 6a2ffc2b
No related branches found
Tags 3.0.0-pre1
No related merge requests found
......@@ -1055,6 +1055,15 @@ static void HandleMediaPlayerSnapshot(const libvlc_event_t * event, void * self)
- (void)play
{
if ([NSThread isMainThread]) {
/* Hack because we create a dead lock here, when the vout is created
* and tries to recontact us on the main thread */
/* FIXME: to do this properly we need to do some locking. We may want
* to move that to libvlc */
[self performSelectorInBackground:@selector(play) withObject:nil];
return;
}
libvlc_media_player_play(_playerInstance);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment