summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorFredrik Hubinette <hubbe@google.com>2018-08-20 12:59:32 -0700
committerMichael Niedermayer <michael@niedermayer.cc>2018-08-22 18:54:23 +0200
commit5ecd580953bbed48e144c364d3cdf7ea1f3e7ddf (patch)
tree5fa7e53905e7b17b2a663075c3c080afd858a5f6 /libavformat/utils.c
parenteb350ab738e7e2590b26d97c465da1138fe54598 (diff)
avformat/utils: avoid undefined integer overflow behavior in update_stream_timings()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index fcd4328587..b0b5e164a6 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 - (uint64_t)start_time_text < AV_TIME_BASE))
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);