Selaa lähdekoodia

media player: fix implementation of deprecated openVideoSubTitlesFromFile() call

Felix Paul Kühne 7 vuotta sitten
vanhempi
commit
ad12408623
1 muutettua tiedostoa jossa 1 lisäystä ja 4 poistoa
  1. 1 4
      Sources/VLCMediaPlayer.m

+ 1 - 4
Sources/VLCMediaPlayer.m

@@ -489,10 +489,7 @@ static void HandleMediaPlayerSnapshot(const libvlc_event_t * event, void * self)
 
 - (BOOL)openVideoSubTitlesFromFile:(NSString *)path
 {
-    return libvlc_media_player_add_slave(_playerInstance,
-                                         libvlc_media_slave_type_subtitle,
-                                         [path UTF8String],
-                                         TRUE);
+    return [self addPlaybackSlave:[NSURL fileURLWithPath:path] type:VLCMediaPlaybackSlaveTypeSubtitle enforce:YES];
 }
 
 - (int)addPlaybackSlave:(NSURL *)slaveURL type:(VLCMediaPlaybackSlaveType)slaveType enforce:(BOOL)enforceSelection