Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
d591dcc0
Commit
d591dcc0
authored
Jan 07, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MacOSX/Framework/VLCMediaPlayer.m: Avoid some Mac OS X libvlc-specific deadlocks.
parent
7d06af29
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
extras/MacOSX/Framework/Sources/VLCMediaPlayer.m
extras/MacOSX/Framework/Sources/VLCMediaPlayer.m
+21
-0
No files found.
extras/MacOSX/Framework/Sources/VLCMediaPlayer.m
View file @
d591dcc0
...
...
@@ -437,6 +437,16 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
-
(
void
)
pause
{
if
(
[
NSThread
isMainThread
]
)
{
/* Hack because we create a dead lock here, when the vout is stopped
* 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
(
pause
)
withObject
:
nil
];
return
;
}
// Return if there is no media available or if the stream is not paused or
// playing something else
if
(
!
media
||
(
!
[
self
isPlaying
]
&&
[
self
state
]
!=
VLCMediaPlayerStatePaused
))
...
...
@@ -446,6 +456,7 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
if
(
!
instance
)
return
;
// Pause the stream
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
...
...
@@ -458,6 +469,16 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
-
(
void
)
stop
{
if
(
[
NSThread
isMainThread
]
)
{
/* Hack because we create a dead lock here, when the vout is stopped
* 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
(
pause
)
withObject
:
nil
];
return
;
}
// Return if there is no media available or if the system is not in play status
// or pause status.
if
(
!
media
||
(
!
[
self
isPlaying
]
&&
[
self
state
]
!=
VLCMediaPlayerStatePaused
))
...
...
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