From fc54db32652bc830fba002da19c2ba9ba4508ca5 Mon Sep 17 00:00:00 2001 From: Dale Curtis Date: Thu, 14 May 2020 14:33:55 -0700 Subject: [PATCH] Use av_sat_sub64() when updating pts by duration. Signed-off-by: Dale Curtis Signed-off-by: Michael Niedermayer --- libavformat/oggparsetheora.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c index 87a676fe48..c481a79d4b 100644 --- a/libavformat/oggparsetheora.c +++ b/libavformat/oggparsetheora.c @@ -191,7 +191,7 @@ static int theora_packet(AVFormatContext *s, int idx) pts = theora_gptopts(s, idx, os->granule, NULL); if (pts != AV_NOPTS_VALUE) - pts -= duration; + pts = av_sat_sub64(pts, duration); os->lastpts = os->lastdts = pts; if(s->streams[idx]->start_time == AV_NOPTS_VALUE) { s->streams[idx]->start_time = os->lastpts; -- GitLab