瀏覽代碼

media player: remove no longer needed async calls

With v4, stop is asynchronous and runs on a background thread, so we no longer need to do it in VLCKit.
Felix Paul Kühne 5 年之前
父節點
當前提交
1a12a2475e
共有 2 個文件被更改,包括 2 次插入6 次删除
  1. 1 3
      Sources/VLCMediaListPlayer.m
  2. 1 3
      Sources/VLCMediaPlayer.m

+ 1 - 3
Sources/VLCMediaListPlayer.m

@@ -224,9 +224,7 @@ static void HandleMediaListPlayerStopped(const libvlc_event_t * event, void * se
 
 - (void)stop
 {
-    dispatch_async(_libVLCBackgroundQueue, ^{
-        libvlc_media_list_player_stop_async(instance);
-    });
+    libvlc_media_list_player_stop_async(instance);
 }
 
 - (BOOL)next

+ 1 - 3
Sources/VLCMediaPlayer.m

@@ -1043,9 +1043,7 @@ static void HandleMediaPlayerRecord(const libvlc_event_t * event, void * self)
 
 - (void)stop
 {
-    dispatch_async(_libVLCBackgroundQueue, ^{
-        libvlc_media_player_stop_async(_playerInstance);
-    });
+    libvlc_media_player_stop_async(_playerInstance);
 }
 
 - (libvlc_video_viewpoint_t *)viewPoint