Commit 0f60f396 authored by Soomin Lee's avatar Soomin Lee Committed by Jean-Baptiste Kempf

iOS: Fix VLCPlaybackController projection checking crash out-of-bounds exception

libVLC 3.0 does not handle correctly multiple video tracks
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent dffedd0c
Pipeline #70 failed with stage
in 0 seconds
......@@ -779,10 +779,11 @@ VLCMediaDelegate>
if (media && currentVideoTrackIndex >= 0) {
NSArray *tracksInfo = media.tracksInformation;
NSDictionary *track = tracksInfo[currentVideoTrackIndex];
if ([track[VLCMediaTracksInformationType] isEqualToString:VLCMediaTracksInformationTypeVideo]) {
return [track[VLCMediaTracksInformationVideoProjection] integerValue];
for (NSDictionary *track in tracksInfo) {
if ([track[VLCMediaTracksInformationType] isEqualToString:VLCMediaTracksInformationTypeVideo]) {
return [track[VLCMediaTracksInformationVideoProjection] integerValue];
}
}
}
return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment