Skip to content

Commit bcf888f

Browse files
committed
Subtitles: Fix automatic display of captions/subtitles.
There was something of a race condition in the previous code. At startup of playback, the decoder thread runs ahead and updates track lists as it encounters them, including audio, cc608, cc708, etc. If no subtitle tracks are found before the UI thread gets to a certain point, the UI thread commits to keeping subtitles disabled, regardless of the "automatically display subtitles" setting. In the new version, at startup of playback, the UI thread keeps the original intention alive so that subtitles will automatically start displaying when they eventually arrive. Note that this fix doesn't address the problem where the player ought to switch to a "better" subtitle track type when it comes along, such as switching from cc608 to cc708. Refs #10740 (only because this fixes a fix with that ref) (cherry picked from commit ac3a988)
1 parent 483f8dd commit bcf888f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mythtv/libs/libmythtv/mythplayer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3979,7 +3979,7 @@ void MythPlayer::ClearAfterSeek(bool clearvideobuffers)
39793979
// nothing except to call ResetCaptions() to erase any captions
39803980
// currently on-screen. The key is that the erasing is done in
39813981
// the UI thread, not the decoder thread.
3982-
EnableSubtitles(GetCaptionsEnabled());
3982+
EnableSubtitles(textDesired);
39833983
deleteMap.TrackerReset(framesPlayed);
39843984
commBreakMap.SetTracker(framesPlayed);
39853985
commBreakMap.ResetLastSkip();

0 commit comments

Comments
 (0)