Changing logic to prevent retrying transcode when stopping a playing video
This commit is contained in:
parent
055c4e5021
commit
f12bf93ebb
|
@ -21,9 +21,9 @@ sub onState(msg)
|
|||
m.bufferCheckTimer.control = "start"
|
||||
m.bufferCheckTimer.ObserveField("fire", "bufferCheck")
|
||||
else if m.top.state = "error"
|
||||
if m.playReported or NOT m.top.retryWithTranscoding
|
||||
m.top.retryWithTranscoding = false ' If playback was reported, don't retry with transcoding
|
||||
|
||||
if not m.playReported and m.top.transcodeAvailable
|
||||
m.top.retryWithTranscoding = true ' If playback was not reported, retry with transcoding
|
||||
else
|
||||
' If an error was encountered, Display dialog
|
||||
dialog = createObject("roSGNode", "Dialog")
|
||||
dialog.title = tr("Error During Playback")
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
<field id="showID" type="string" />
|
||||
|
||||
<field id="transcodeParams" type="assocarray" />
|
||||
<field id="transcodeAvailable" type="boolean" value="false" />
|
||||
<field id="retryWithTranscoding" type="boolean" value="false" />
|
||||
<field id="isTranscoded" type="boolean" />
|
||||
<field id="transcodeReasons" type="array" />
|
||||
|
|
|
@ -194,12 +194,11 @@ sub AddVideoContent(video, mediaSourceId, audio_stream_idx = 1, subtitle_idx = -
|
|||
' artifacts. If the user preference is set, and the only reason the server says we need to
|
||||
' transcode is that the Envoding Level is not supported, then try to direct play but silently
|
||||
' fall back to the transcode if that fails.
|
||||
video.retryWithTranscoding = false
|
||||
if get_user_setting("playback.tryDirect.h264ProfileLevel") = "true" and playbackInfo.MediaSources[0].TranscodingUrl <> invalid and forceTranscoding = false and playbackInfo.MediaSources[0].MediaStreams[0].codec = "h264"
|
||||
transcodingReasons = getTranscodeReasons(playbackInfo.MediaSources[0].TranscodingUrl)
|
||||
if transcodingReasons.Count() = 1 and transcodingReasons[0] = "VideoLevelNotSupported"
|
||||
video.directPlaySupported = true
|
||||
video.retryWithTranscoding = true
|
||||
video.transcodeAvailable = true
|
||||
end if
|
||||
end if
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user