[mythtv-users] Fix for forced subtitle problems

Angela angela.schmid at wolke7.net
Sat Dec 16 02:12:11 UTC 2023

>... well, unless - is there any chance that you've built but not 
>installed or something, so that in fact you aren't testing my commits?

With the 3 commits the behavior of TOGGLECC changed, but it does not flip forced to non-forced.

>With global setting "subtitles enabled"
>At start: "Using subtitle_ger_forced.srt" (as I have german configured) 
>Back to start of movie 
>Press TOGLLECC: OSD "German forced OFF"
>Shows "Using subtitle_ger_forced.srt"

>With global setting "subtitles disabled"
>At start: "Using subtitle_ger_forced.srt"
>Back to start of movie
>Press TOGLLECC: OSD "German non-forced ON"  ***********
>Shows "Using subtitle_ger_forced.srt" (the non-forced is not shown)

The following shows the version used in the log:

mythfrontend version: myfixestracked/master_20231204 [v34-Pre-597-gce225e4fac] www.mythtv.org

git rev-parse HEAD

git describe

git log
commit ce225e4fac38365a44062aaffa6023dacd765905 (HEAD -> myfixestracked/master_20231204)
Author: Paul Gardiner <mythtv at glidos.net>
Date:   Fri Dec 1 19:59:39 2023 +0000

    Avoid displaying two AV subtitle tracks simultaneously

    Recent changes to the handling of forced AV subtitle tracks require that
    two tracks may be considered for processing simultaneously. This happens
    if there is a forced track and a user enabled one. This commit ensures
    that the user enabled one inhibits the forced one.

commit bcb47dcd3097a569a4384a0f149f0f5edd45423b
Author: Paul Gardiner <mythtv at glidos.net>
Date:   Tue Nov 28 15:55:07 2023 +0000

    Handle forced AV subtitles without needing a forced track to be selected

    This improves the behaviour of mythfrontend in its automatic handling of
    forced subtitle tracks. The previous behaviour relied on automatically
    selecting the forced track as a default for the user's preference. The new
    behaviour attempts to find a non-forced track for the user's preference and
    changes the subtitle toggle feature to be between forced and non-forced,
    rather than on and off.

commit 764a54a9e7e3fec02f79b396269a60d0472f5839
Author: Paul Gardiner <mythtv at glidos.net>
Date:   Tue Nov 28 12:12:46 2023 +0000

    Factor out the best track calculation for selecting the subtitle track

    Also generalise the algorithm to allow forced tracks to be disfavored.
    This is work towards improving the handling of forced tracks.


Maybe Peters b47e464825b7acaadc2d21de76ce6cfbd181ed1c might break your v33.

There are several changes between your branch and master. You are 601 commits behind.

The following shows the changes in the files from your pull, from the ancestor (your branch and master) to master:

git merge-base improve-forced-subtitle-handling-fixes-33 master

git log 62a2cfb6bcb2a97849bec0cfcd6f2293f1559dcc..HEAD --follow -- mythtv/libs/libmythtv/decoders/avformatdecoder.cpp
git log 62a2cfb6bcb2a97849bec0cfcd6f2293f1559dcc..HEAD --follow -- mythtv/libs/libmythtv/decoders/decoderbase.cpp
git log 62a2cfb6bcb2a97849bec0cfcd6f2293f1559dcc..HEAD --follow -- mythtv/libs/libmythtv/decoders/decoderbase.h
git log 62a2cfb6bcb2a97849bec0cfcd6f2293f1559dcc..HEAD --follow -- mythtv/libs/libmythtv/captions/subtitlereader.h
git log 62a2cfb6bcb2a97849bec0cfcd6f2293f1559dcc..HEAD --follow -- mythtv/libs/libmythtv/captions/textsubtitleparser.h

git diff --stat 62a2cfb6bcb2a97849bec0cfcd6f2293f1559dcc master mythtv/libs/libmythtv/decoders/avformatdecoder.cpp
git diff --stat 62a2cfb6bcb2a97849bec0cfcd6f2293f1559dcc master mythtv/libs/libmythtv/decoders/decoderbase.cpp
git diff --stat 62a2cfb6bcb2a97849bec0cfcd6f2293f1559dcc master mythtv/libs/libmythtv/decoders/decoderbase.h
git diff --stat 62a2cfb6bcb2a97849bec0cfcd6f2293f1559dcc master mythtv/libs/libmythtv/captions/subtitlereader.h 
git diff --stat 62a2cfb6bcb2a97849bec0cfcd6f2293f1559dcc master mythtv/libs/libmythtv/captions/textsubtitleparser.h


In my previous mails, I mentioned several times some misbehavior which exists since many versions, which I think should be fixed first, or what I suggested to not differentiate between forced and non-forced, which makes the interaction much easier.
I am still hoping for comments.

I have one request, please do not change the behavior of TOGGLECC.

More information about the mythtv-users mailing list