[FFmpeg-cvslog] lavf/webvttenc: Always write hours in the timestamp with two characters.

Carl Eugen Hoyos git at videolan.org
Wed Sep 19 19:08:19 EEST 2018


ffmpeg | branch: master | Carl Eugen Hoyos <ceffmpeg at gmail.com> | Mon Sep 17 18:20:05 2018 +0200| [26902f2ef0dc7b65992228767b8adba46e7a6d48] | committer: Carl Eugen Hoyos

lavf/webvttenc: Always write hours in the timestamp with two characters.

Fixes ticket #7442.

Reviewed-by: Reto Kromer

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=26902f2ef0dc7b65992228767b8adba46e7a6d48
---

 libavformat/webvttenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/webvttenc.c b/libavformat/webvttenc.c
index 4827de05d5..61b7f54622 100644
--- a/libavformat/webvttenc.c
+++ b/libavformat/webvttenc.c
@@ -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);
 }



More information about the ffmpeg-cvslog mailing list