Handle invalid result from CanDecodeVideo

This commit is contained in:
Neil Burrows 2021-04-30 08:23:38 +01:00
parent 84dbf38e1d
commit ee3f8810da

View File

@ -263,7 +263,10 @@ function directPlaySupported(meta as object) as boolean
streamInfo.Container = meta.json.MediaSources[0].container streamInfo.Container = meta.json.MediaSources[0].container
end if end if
end if end if
return devinfo.CanDecodeVideo(streamInfo).result
decodeResult = devinfo.CanDecodeVideo(streamInfo)
return decodeResult <> invalid and decodeResult.result
end function end function
function decodeAudioSupported(meta as object, audio_stream_idx = 1) as boolean function decodeAudioSupported(meta as object, audio_stream_idx = 1) as boolean