lavf/webvttenc: Always write hours in the timestamp with two characters.
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>
Mon, 17 Sep 2018 16:20:05 +0000 (18:20 +0200)
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>
Wed, 19 Sep 2018 16:07:32 +0000 (18:07 +0200)
Fixes ticket #7442.

Reviewed-by: Reto Kromer
libavformat/webvttenc.c

index 4827de0..61b7f54 100644 (file)
@@ -38,7 +38,7 @@ static void webvtt_write_time(AVIOContext *pb, int64_t millisec)
     min -= 60 * hour;
 
     if (hour > 0)
-        avio_printf(pb, "%"PRId64":", hour);
+        avio_printf(pb, "%02"PRId64":", hour);
 
     avio_printf(pb, "%02"PRId64":%02"PRId64".%03"PRId64"", min, sec, millisec);
 }