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:
dae38a6
)
update_stream_timings: check bitrate for being in range.
author
Michael Niedermayer
<michaelni@gmx.at>
Mon, 4 Mar 2013 17:54:00 +0000
(18:54 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Mon, 4 Mar 2013 17:54:00 +0000
(18:54 +0100)
Fixes numerical overflow
Fixes Ticket2089
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/utils.c
patch
|
blob
|
history
diff --git
a/libavformat/utils.c
b/libavformat/utils.c
index
724cc05
..
f71184f
100644
(file)
--- a/
libavformat/utils.c
+++ b/
libavformat/utils.c
@@
-2230,8
+2230,10
@@
static void update_stream_timings(AVFormatContext *ic)
}
if (ic->pb && (filesize = avio_size(ic->pb)) > 0 && ic->duration != AV_NOPTS_VALUE) {
/* compute the bitrate */
-
ic->bit_
rate = (double)filesize * 8.0 * AV_TIME_BASE /
+
double bit
rate = (double)filesize * 8.0 * AV_TIME_BASE /
(double)ic->duration;
+ if (bitrate >= 0 && bitrate <= INT_MAX)
+ ic->bit_rate = bitrate;
}
}