Просмотр исходного кода

Media: only sync parse if really needed

(cherry picked from commit 170b9c7a622cfe861f005d3c378bb28ad9755711)
Felix Paul Kühne 9 лет назад
Родитель
Сommit
c721ebfa32
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      Sources/VLCMedia.m

+ 2 - 1
Sources/VLCMedia.m

@@ -597,7 +597,8 @@ NSString *const VLCMediaTracksInformationTextEncoding = @"encoding"; // NSString
 
 - (NSArray *)tracksInformation
 {
-    [self synchronousParse];
+    if (!self.isParsed)
+        [self synchronousParse];
 
     libvlc_media_track_t **tracksInfo;
     unsigned int count = libvlc_media_tracks_get(p_md, &tracksInfo);