summaryrefslogtreecommitdiff
path: root/libavformat/webvttdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/webvttdec.c')
-rw-r--r--libavformat/webvttdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/webvttdec.c b/libavformat/webvttdec.c
index b1cd2938ee..aeb705095f 100644
--- a/libavformat/webvttdec.c
+++ b/libavformat/webvttdec.c
@@ -49,8 +49,8 @@ static int webvtt_probe(AVProbeData *p)
static int64_t read_ts(const char *s)
{
int hh, mm, ss, ms;
- if (sscanf(s, "%u:%u:%u.%u", &hh, &mm, &ss, &ms) == 4) return (hh*3600 + mm*60 + ss) * 1000 + ms;
- if (sscanf(s, "%u:%u.%u", &mm, &ss, &ms) == 3) return ( mm*60 + ss) * 1000 + ms;
+ if (sscanf(s, "%u:%u:%u.%u", &hh, &mm, &ss, &ms) == 4) return (hh*3600LL + mm*60LL + ss) * 1000LL + ms;
+ if (sscanf(s, "%u:%u.%u", &mm, &ss, &ms) == 3) return ( mm*60LL + ss) * 1000LL + ms;
return AV_NOPTS_VALUE;
}