Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-iOS
Commits
6c464d56
Commit
6c464d56
authored
May 20, 2013
by
Felix Paul Kühne
Browse files
fix potential exceptions when handling media content which is not part of the media library
parent
80b3bfdb
Changes
1
Hide whitespace changes
Inline
Side-by-side
AspenProject/VLCMovieViewController.m
View file @
6c464d56
...
...
@@ -178,7 +178,8 @@
[
UIApplication
sharedApplication
].
statusBarStyle
=
UIStatusBarStyleBlackOpaque
;
[
_mediaPlayer
pause
];
[
super
viewWillDisappear
:
animated
];
self
.
mediaItem
.
lastPosition
=
@
([
_mediaPlayer
position
]);
if
(
self
.
mediaItem
)
self
.
mediaItem
.
lastPosition
=
@
([
_mediaPlayer
position
]);
[
_mediaPlayer
stop
];
}
...
...
@@ -549,15 +550,13 @@
-
(
void
)
applicationWillResignActive
:(
NSNotification
*
)
aNotification
{
NSLog
(
@"applicationWillResignActive"
);
self
.
mediaItem
.
lastPosition
=
@
([
_mediaPlayer
position
]);
if
(
self
.
mediaItem
)
self
.
mediaItem
.
lastPosition
=
@
([
_mediaPlayer
position
]);
if
(
!
[[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
kVLCSettingContinueAudioInBackgroundKey
]
intValue
])
{
NSLog
(
@"pausing playback"
);
[
_mediaPlayer
pause
];
_shouldResumePlaying
=
YES
;
}
else
NSLog
(
@"continuing playback"
);
}
}
-
(
void
)
applicationDidEnterBackground
:(
NSNotification
*
)
notification
...
...
Write
Preview
Supports
Markdown
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