浏览代码

VLCPlaybackController: remove double next call (closes #243)

Next is already called internally this lead to a double next call.
Albums incorrectly started after repeat at index 1

(cherry picked from commit 0e13b760ddb26dda4de51f92c4cc609338e34629)
Carola Nitz 7 年之前
父节点
当前提交
413a465f71
共有 1 个文件被更改,包括 2 次插入6 次删除
  1. 2 6
      Sources/VLCPlaybackController.m

+ 2 - 6
Sources/VLCPlaybackController.m

@@ -753,16 +753,12 @@ typedef NS_ENUM(NSUInteger, VLCAspectRatio) {
         case VLCMediaPlayerStateStopped: {
             [_listPlayer.mediaList lock];
             NSUInteger listCount = _listPlayer.mediaList.count;
+            [_listPlayer.mediaList unlock];
             if ([_listPlayer.mediaList indexOfMedia:_mediaPlayer.media] == listCount - 1 && self.repeatMode == VLCDoNotRepeat) {
-                [_listPlayer.mediaList unlock];
                 _sessionWillRestart = NO;
                 [self stopPlayback];
                 return;
-            } else if (listCount > 1) {
-                [_listPlayer.mediaList unlock];
-                [_listPlayer next];
-            } else
-                [_listPlayer.mediaList unlock];
+            }
         } break;
         case VLCMediaPlayerStateESAdded: {
 #if TARGET_OS_IOS