You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
After running into a stream error with subtitle track, playback gets stuck every time the subtitle cue is empty #2328
We have some channels, that only provide subtitles for certain shows during the day. For the rest of the shows the subtitle cue is empty. Even for the channels, that provide subtitles for every show, it's not guaranteed, that the subtitle cue is always not empty. Typically during the ad breaks, there will be no input for the subtitle cue.
I checked the implementation of the isReady() function of the TextRenderer and I see following reasons for this behavior:
Once streamError is set, it will never be cleared.
Once streamError is set, following check "checkNotNull(cuesResolver).getNextCueChangeTimeUs(lastRendererPositionUs) != C.TIME_END_OF_SOURCE" will lead to a not ready state of the TextRenderer whenever the subtitle cue is empty.
It would help to reset streamError after the subtitle track is disabled. I tried to do it inside of onPositionReset() of TextRenderer and it seems to work, but I'm not sure if it's the right place to do it.
Also after the subtitle track gets disabled after stream error, I would expect this state to be reflected in onTracksChanged() of Player.Listener, but I see, that the subtitle track stays selected. Is my expectation correct or is there another way how to make the state of the subtitle track transparent to the user?
Activity
vkoehler commentedon Apr 11, 2025
We have some channels, that only provide subtitles for certain shows during the day. For the rest of the shows the subtitle cue is empty. Even for the channels, that provide subtitles for every show, it's not guaranteed, that the subtitle cue is always not empty. Typically during the ad breaks, there will be no input for the subtitle cue.
I checked the implementation of the isReady() function of the TextRenderer and I see following reasons for this behavior:
It would help to reset streamError after the subtitle track is disabled. I tried to do it inside of onPositionReset() of TextRenderer and it seems to work, but I'm not sure if it's the right place to do it.
Also after the subtitle track gets disabled after stream error, I would expect this state to be reflected in onTracksChanged() of Player.Listener, but I see, that the subtitle track stays selected. Is my expectation correct or is there another way how to make the state of the subtitle track transparent to the user?
icbaker commentedon Apr 28, 2025
I initially struggled to find this because it was sent with the subject
Issue #2283, which is a different issue you filed.I can reproduce the issue using the steps provided.
I've sent a fix for review which clears the
streamErrorin bothTextRenderer.onStreamChangedandonDisabled.Clear `TextRenderer.streamError` when disabling or changing stream
icbaker commentedon Apr 29, 2025
This is fixed by the commit linked above.