prevent crash when language is invalid
This commit is contained in:
parent
f359a7c3bf
commit
94f284567a
|
@ -405,9 +405,11 @@ function FindPreferredAudioStream(streams as dynamic) as integer
|
|||
|
||||
if preferredLanguage <> invalid
|
||||
for i = 0 to streams.Count() - 1
|
||||
if LCase(streams[i].Type) = "audio" and LCase(streams[i].Language) = LCase(preferredLanguage)
|
||||
if LCase(streams[i].Type) = "audio"
|
||||
if streams[i].Language <> invalid and LCase(streams[i].Language) = LCase(preferredLanguage)
|
||||
return i
|
||||
end if
|
||||
end if
|
||||
end for
|
||||
end if
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user