[vlc-devel] [PATCH] Fix #16075 WebVTT subtitles not working properly.
Denis Charmet
typx at dinauz.org
Wed Dec 9 15:08:44 CET 2015
Hi,
Le mardi 08 décembre 2015 à 07:18:13, Andrea Giudiceandrea a écrit :
> Solves the problem for mm:ss.ddd timestamps (#16075).
>
> Signed-off-by: Andrea Giudiceandrea <andreaerdna at libero.it>
> ---
> modules/demux/subtitle.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/modules/demux/subtitle.c b/modules/demux/subtitle.c
> index bc21d35..c68821d 100644
> --- a/modules/demux/subtitle.c
> +++ b/modules/demux/subtitle.c
> @@ -2190,18 +2190,18 @@ static int ParseCommonVTTSBV( demux_t *p_demux, subtitle_t *p_subtitle, int i_id
> if( p_sys->i_type == SUB_TYPE_VTT )
> {
> b_matched =
> - ( sscanf( s,"%d:%d:%d.%d --> %d:%d:%d.%d",
> - &h1, &m1, &s1, &d1,
> - &h2, &m2, &s2, &d2 ) == 8 ||
> - sscanf( s,"%d:%d:%d.%d --> %d:%d.%d",
> - &h1, &m1, &s1, &d1,
> - &m2, &s2, &d2 ) == 7 ||
> + ( sscanf( s,"%d:%d.%d --> %d:%d.%d",
> + &m1, &s1, &d1,
> + &m2, &s2, &d2 ) == 6 ||
> sscanf( s,"%d:%d.%d --> %d:%d:%d.%d",
> &m1, &s1, &d1,
> &h2, &m2, &s2, &d2 ) == 7 ||
> - sscanf( s,"%d:%d.%d --> %d:%d.%d",
> - &m1, &s1, &d1,
> - &m2, &s2, &d2 ) == 6 );
> + sscanf( s,"%d:%d:%d.%d --> %d:%d.%d",
> + &h1, &m1, &s1, &d1,
> + &m2, &s2, &d2 ) == 7 ||
from hh:mm:ss.ddd to mm:ss.ddd seems quite unlikely
> + sscanf( s,"%d:%d:%d.%d --> %d:%d:%d.%d",
> + &h1, &m1, &s1, &d1,
> + &h2, &m2, &s2, &d2 ) == 8 );
> }
> else if( p_sys->i_type == SUB_TYPE_SBV )
> {
> --
> 1.9.4.msysgit.1
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
--
Denis Charmet - TypX
Le mauvais esprit est un art de vivre
More information about the vlc-devel
mailing list