Commit 91ae8e07 authored by Felix Paul Kühne's avatar Felix Paul Kühne

playback view: fix most frequent crash #2 by making sure that we don't ever do...

playback view: fix most frequent crash #2 by making sure that we don't ever do any OpenGL while in the background
parent 87ac0752
......@@ -965,11 +965,14 @@
{
[self _saveCurrentState];
_mediaPlayer.currentVideoTrackIndex = 0;
if (![[[NSUserDefaults standardUserDefaults] objectForKey:kVLCSettingContinueAudioInBackgroundKey] boolValue]) {
[_mediaPlayer pause];
_shouldResumePlaying = YES;
} else
_mediaPlayer.currentVideoTrackIndex = 0;
}
glFinish();
}
- (void)applicationDidEnterBackground:(NSNotification *)notification
......@@ -979,11 +982,12 @@
- (void)applicationDidBecomeActive:(NSNotification *)notification
{
_mediaPlayer.currentVideoTrackIndex = 1;
if (_shouldResumePlaying) {
_shouldResumePlaying = NO;
[_mediaPlayer play];
} else
_mediaPlayer.currentVideoTrackIndex = 1;
}
}
- (void)_updateExportedPlaybackInformation
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment