Parcourir la source

VLCMedia: Remove media parsing in tracks information getter

A media can be parsed by a media player whitout having the VLCMediaParsedStatusInit status.
This caused the tracksInformation() method to return an empty array when a media
was parsed by a media player.

Furthermore, the user should be responsible for the parsing of the media and not
the library itself.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Soomin Lee il y a 8 ans
Parent
commit
a691e327fa
1 fichiers modifiés avec 0 ajouts et 6 suppressions
  1. 0 6
      Sources/VLCMedia.m

+ 0 - 6
Sources/VLCMedia.m

@@ -649,12 +649,6 @@ NSString *const VLCMediaTracksInformationTextEncoding = @"encoding"; // NSString
 
 - (NSArray *)tracksInformation
 {
-    VLCMediaParsedStatus parsedStatus = [self parsedStatus];
-    if (parsedStatus == VLCMediaParsedStatusSkipped || parsedStatus == VLCMediaParsedStatusInit) {
-        [self parseWithOptions:VLCMediaParseLocal|VLCMediaParseNetwork];
-        return @[];
-    }
-
     libvlc_media_track_t **tracksInfo;
     unsigned int count = libvlc_media_tracks_get(p_md, &tracksInfo);
     NSMutableArray *array = [NSMutableArray array];