[vlc-commits] codec: webvtt: hours can be > 2 digits

Francois Cartegnie git at videolan.org
Thu Feb 1 21:30:47 CET 2018


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Feb  1 13:42:34 2018 +0100| [12181852eb3a8ece3081bd4bf70e147d616a4593] | committer: Francois Cartegnie

codec: webvtt: hours can be > 2 digits

(cherry picked from commit 4ee0d305109fa3a5f42d5ca857225c336bfd7683)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=12181852eb3a8ece3081bd4bf70e147d616a4593
---

 modules/codec/webvtt/webvtt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/webvtt/webvtt.c b/modules/codec/webvtt/webvtt.c
index 28e38863dd..5649e1b31e 100644
--- a/modules/codec/webvtt/webvtt.c
+++ b/modules/codec/webvtt/webvtt.c
@@ -98,7 +98,7 @@ bool webvtt_scan_time( const char *psz, mtime_t *p_time )
         *p_time = MakeTime( t );
         return true;
     }
-    else if( sscanf( psz, "%2u:%2u:%2u.%3u",
+    else if( sscanf( psz, "%u:%2u:%2u.%3u",
                           &t[0], &t[1], &t[2], &t[3] ) == 4 )
     {
         *p_time = MakeTime( t );



More information about the vlc-commits mailing list