Procházet zdrojové kódy

playback controller: fix subtitle when automatically play next item option are disabled

URLWithString doesn't return nil when the variable _pathToExternalSubtitlesFile contain local path.
Pierre SAGASPE před 6 roky
rodič
revize
f3666e6ce6
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      Sources/VLCPlaybackController.m

+ 1 - 1
Sources/VLCPlaybackController.m

@@ -256,7 +256,7 @@ typedef NS_ENUM(NSUInteger, VLCAspectRatio) {
     if (_pathToExternalSubtitlesFile) {
         /* this could be a path or an absolute string - let's see */
         NSURL *subtitleURL = [NSURL URLWithString:_pathToExternalSubtitlesFile];
-        if (!subtitleURL) {
+        if (!subtitleURL || !subtitleURL.scheme) {
             subtitleURL = [NSURL fileURLWithPath:_pathToExternalSubtitlesFile];
         }
         if (subtitleURL) {