diff mbox

[FFmpeg-devel] lavf/webvttenc: Always write hours in timestamps with two characters

Message ID CAB0OVGob8T8amjyWZLWGpcmvDQ2CP8sqa4sv98m2a3UtpHdEmQ@mail.gmail.com
State Accepted
Headers show

Commit Message

Carl Eugen Hoyos Sept. 17, 2018, 4:22 p.m. UTC
Hi!

Attached patch fixes ticket #7442 for me.

Please comment, Carl Eugen

Comments

Reto Kromer Sept. 17, 2018, 5:16 p.m. UTC | #1
Carl Eugen Hoyos wrote:

>Attached patch fixes ticket #7442 for me.

LGTM

Best regards, Reto
Carl Eugen Hoyos Sept. 19, 2018, 4:08 p.m. UTC | #2
2018-09-17 19:16 GMT+02:00, Reto Kromer <lists@reto.ch>:
> Carl Eugen Hoyos wrote:
>
>>Attached patch fixes ticket #7442 for me.
>
> LGTM

Patch applied.

Thank you, Carl Eugen
diff mbox

Patch

From cbec1355c59ff1cfcb5051c8c75c09258d1cc569 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Mon, 17 Sep 2018 18:20:05 +0200
Subject: [PATCH] lavf/webvttenc: Always write hours in the timestamp with two
 characters.

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

diff --git a/libavformat/webvttenc.c b/libavformat/webvttenc.c
index 4827de0..61b7f54 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);
 }
-- 
1.7.10.4