Prechádzať zdrojové kódy

Move the update UI with metadata call to the mainqueue to avoid crashes when the UI was updated from the background.
This also resolves the only Audio but no Video issue.

Carola Nitz 7 rokov pred
rodič
commit
72a456dd90
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      Sources/VLCPlaybackController.m

+ 1 - 1
Sources/VLCPlaybackController.m

@@ -938,7 +938,7 @@ VLCMediaDelegate>
 {
     if (_needsMetadataUpdate == NO) {
         _needsMetadataUpdate = YES;
-        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), DISPATCH_QUEUE_PRIORITY_DEFAULT, ^{
+        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
             [self _updateDisplayedMetadata];
         });
     }