[vlc-devel] [PATCH] Regression fix for non-SPU subtitles in MKV containers.

Denis Charmet typx at dinauz.org
Thu Nov 21 20:58:46 CET 2013


Hi,

Le jeudi 21 novembre 2013 à 07:32:39, Ago Allikmaa a écrit :
> Patch (46fe18b280ed5825fd701edeedb2f5c24de001a2) caused block length
> in BlockDecode to be set only for VLC_CODEC_SPU tracks instead of
> all tracks as before. This broke other types of subtitle tracks (like SSA),
> so I made that length setting occur for all types of subtitle tracks.

Yeah my bad I read too fast and missed the lack of '!' before strcmp

> +            else if( tk->fmt.i_cat == SPU_ES )
In fact this will be wrong too, you can remove the whole i_cat test. And
just keep the "if( strcmp( tk->psz_codec, "S_VOBSUB" ) ) {...}" part.

Or even better add a bool b_no_duration flag in the track structure to avoid the
strcmp each time. Like if( !tk->b_no_duration ) this flag being set to
true only for VOBSUB.

> +            {
> +                if( strcmp( tk->psz_codec, "S_VOBSUB" ) )
> +                    p_block->i_length = i_duration * tk-> f_timecodescale *
> +                        (double) p_segment->i_timescale / 1000.0;
> +            }
> +
>              p_block->i_dts = p_block->i_pts = i_pts;
>          }

Regards,

-- 
Denis Charmet - TypX
Le mauvais esprit est un art de vivre



More information about the vlc-devel mailing list