From d7bd55c3d280c10b990577003a985296f10a2b59 Mon Sep 17 00:00:00 2001
From: Fredrik Hubinette <[email protected]>
Date: Tue, 17 Jul 2018 14:35:55 -0700
Subject: [PATCH] Avoid undefined behavior when start_time_text is -1<<63
---
libavformat/utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index c9cdd2b470..5b83ed7872 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2666,7 +2666,7 @@ static void update_stream_timings(AVFormatContext *ic)
duration = FFMAX(duration, duration1);
}
}
- if (start_time == INT64_MAX || (start_time > start_time_text && start_time - start_time_text < AV_TIME_BASE))
+ if (start_time == INT64_MAX || (start_time > start_time_text && start_time - AV_TIME_BASE < start_time_text ))
start_time = start_time_text;
else if (start_time > start_time_text)
av_log(ic, AV_LOG_VERBOSE, "Ignoring outlier non primary stream starttime %f\n", start_time_text / (float)AV_TIME_BASE);
--
2.18.0.203.gfac676dfb9-goog
_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel