ソースを参照

media discoverer: fix potential deadlock

(cherry picked from commit d03d0ac9910a709047fd950d9ebc28e9f7385c7c)
Felix Paul Kühne 9 年 前
コミット
9c54735ad8
1 ファイル変更5 行追加0 行削除
  1. 5 0
      Sources/VLCMediaDiscoverer.m

+ 5 - 0
Sources/VLCMediaDiscoverer.m

@@ -105,6 +105,11 @@
 
 - (void)stopDiscoverer
 {
+    if ([NSThread isMainThread]) {
+        [self performSelectorInBackground:@selector(stopDiscoverer) withObject:nil];
+        return;
+    }
+
     if (!_mdis) {
         _running = NO;
         return;