[vlc-devel] [PATCH] Fix #16075 WebVTT subtitles not working properly.
Andrea Giudiceandrea
andreaerdna at libero.it
Tue Dec 8 20:18:13 CET 2015
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 ||
+ 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
More information about the vlc-devel
mailing list