소스 검색

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 6 년 전
부모
커밋
f3666e6ce6
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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) {