[vlc-devel] [PATCH] Preliminary dual subtitles support.

Francois Cartegnie fcvlcdev at free.fr
Wed Apr 24 14:38:21 CEST 2019


Le 24/04/2019 à 13:19, Roland Bewick a écrit :
> Because the change I made only effects the selection of subtitles I
> think the change will not break any existing auto deselection
> functionality.>
> For example, when I open a new video file, all the subtitles I
> previously opened are still removed, leaving a blank state as expected.

Then your tests are too simplistic, and you don't see the extent of the
subtitle selection.

If a demux forcefully (by scripting, ...) selects another subtitle, the
core must disable the previous one.

Switching the policy not only allows 2, but N simultaneous subtitles.

Then now any non spu ES now overrides selection rules...

     if( p_esprops && p_sys->i_mode == ES_OUT_MODE_AUTO && EsIsSelected(
es ) )
-        p_esprops->p_main_es = es;
+    {
+        if( p_esprops->p_main_es == NULL || es->fmt.i_cat != SPU_ES )
+        {
+            p_esprops->p_main_es = es;
+        }

>> And as François hinted, hard-coding an alignment will break existing
>> settings.
> He said it wouldn't as long as there wasn't an existing bug. The codecs
> were designed to load settings from user config. The codecs themselves
> however OR'd in the bottom position in the case the user only set
> horizontal alignment. I simply removed that hard coding so that vertical
> alignment can also be set.

The auto is bogus from the start.

I don't want my subtitles centered if no user value exists.

-- 
Francois Cartegnie
VideoLAN - VLC Developer


More information about the vlc-devel mailing list