Fix undefined subtitle stream index

This commit is contained in:
viown 2024-10-19 13:25:07 +03:00
parent 81d50e73e5
commit 05ce167c77

View File

@ -2641,7 +2641,9 @@ export class PlaybackManager {
}
if (mediaSource.DefaultSubtitleStreamIndex == null || mediaSource.DefaultSubtitleStreamIndex < 0) {
mediaSource.DefaultSubtitleStreamIndex = mediaSource.DefaultSecondarySubtitleStreamIndex;
if (mediaSource.DefaultSecondarySubtitleStreamIndex != null) {
mediaSource.DefaultSubtitleStreamIndex = mediaSource.DefaultSecondarySubtitleStreamIndex;
}
mediaSource.DefaultSecondarySubtitleStreamIndex = -1;
}