vlc | branch: master | Andrea Giudiceandrea <[email protected]> | Tue Dec  
8 19:18:13 2015 +0000| [0ff9caf665f5711030d02bb5e42ebe8de56db9ee] | committer: 
Jean-Baptiste Kempf

Fix WebVTT subtitles mm:ss.ddd timestamps

Fix #16075

Signed-off-by: Andrea Giudiceandrea <[email protected]>
Signed-off-by: Jean-Baptiste Kempf <[email protected]>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0ff9caf665f5711030d02bb5e42ebe8de56db9ee
---

 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 )
         {

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to