Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
454
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
0c75297a
Commit
0c75297a
authored
5 years ago
by
Felix Paul Kühne
Browse files
Options
Downloads
Patches
Plain Diff
macosx/continuity controller: fix deadlock
parent
503bc8df
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/gui/macosx/playlist/VLCPlaybackContinuityController.m
+6
-7
6 additions, 7 deletions
...les/gui/macosx/playlist/VLCPlaybackContinuityController.m
with
6 additions
and
7 deletions
modules/gui/macosx/playlist/VLCPlaybackContinuityController.m
+
6
−
7
View file @
0c75297a
...
...
@@ -32,7 +32,6 @@
@interface
VLCPlaybackContinuityController
()
{
__weak
VLCMain
*
_mainInstance
;
input_item_t
*
p_current_input
;
}
@end
...
...
@@ -53,7 +52,6 @@
{
self
=
[
super
init
];
if
(
self
)
{
_mainInstance
=
[
VLCMain
sharedInstance
];
NSNotificationCenter
*
notificationCenter
=
[
NSNotificationCenter
defaultCenter
];
[
notificationCenter
addObserver
:
self
selector:
@selector
(
inputItemChanged
:)
...
...
@@ -75,17 +73,18 @@
if
(
p_current_input
)
{
/* continue playback where you left off */
[
self
storePlaybackPositionForItem
:
p_current_input
player
:
_main
Instance
.
playlistController
.
playerController
];
[
self
storePlaybackPositionForItem
:
p_current_input
player
:
[
VLCMain
shared
Instance
]
.
playlistController
.
playerController
];
}
}
-
(
void
)
inputItemChanged
:(
NSNotification
*
)
aNotification
{
VLCMain
*
mainInstance
=
[
VLCMain
sharedInstance
];
// Cancel pending resume dialogs
[[
_
mainInstance
resumeDialog
]
cancel
];
[[
mainInstance
resumeDialog
]
cancel
];
// object is hold here and released then it is dead
p_current_input
=
[[
_
mainInstance
playlistController
]
currentlyPlayingInputItem
];
p_current_input
=
[[
mainInstance
playlistController
]
currentlyPlayingInputItem
];
if
(
p_current_input
)
{
VLCPlaylistController
*
playlistController
=
aNotification
.
object
;
[
self
continuePlaybackWhereYouLeftOff
:
p_current_input
player
:
playlistController
.
playerController
];
...
...
@@ -96,7 +95,7 @@
{
// On shutdown, input might not be dead yet. Cleanup actions like itunes playback
// and playback positon are done in different code paths (dealloc and appWillTerminate:).
if
([
_main
Instance
isTerminating
])
{
if
([
[
VLCMain
shared
Instance
]
isTerminating
])
{
return
;
}
...
...
@@ -187,7 +186,7 @@
return
;
}
[[
_main
Instance
resumeDialog
]
showWindowWithItem
:
p_input_item
[[
[
VLCMain
shared
Instance
]
resumeDialog
]
showWindowWithItem
:
p_input_item
withLastPosition:
lastPosition
.
intValue
completionBlock:
completionBlock
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment