OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc48248
)
lavf/utils: Avoid an overflow for huge negative durations.
author
Carl Eugen Hoyos
<cehoyos@ag.or.at>
Sat, 24 Sep 2016 11:07:39 +0000
(13:07 +0200)
committer
Carl Eugen Hoyos
<cehoyos@ag.or.at>
Sat, 24 Sep 2016 19:01:46 +0000
(21:01 +0200)
Fixes ticket #5135.
libavformat/utils.c
patch
|
blob
|
history
diff --git
a/libavformat/utils.c
b/libavformat/utils.c
index
93ea6ff
..
3e0f57d
100644
(file)
--- a/
libavformat/utils.c
+++ b/
libavformat/utils.c
@@
-2547,7
+2547,7
@@
static void update_stream_timings(AVFormatContext *ic)
end_time1 = av_rescale_q_rnd(st->duration, st->time_base,
AV_TIME_BASE_Q,
AV_ROUND_NEAR_INF|AV_ROUND_PASS_MINMAX);
- if (end_time1 != AV_NOPTS_VALUE &&
start_time1 <= INT64_MAX - end_time1
) {
+ if (end_time1 != AV_NOPTS_VALUE &&
(end_time1 > 0 ? start_time1 <= INT64_MAX - end_time1 : start_time1 >= INT64_MIN - end_time1)
) {
end_time1 += start_time1;
end_time = FFMAX(end_time, end_time1);
}