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:
61d8fa2
)
xavs: Do not try to set the bitrate tolerance without a bitrate
author
Luca Barbato
<lu_zero@gentoo.org>
Sun, 23 Aug 2015 15:57:21 +0000
(17:57 +0200)
committer
Luca Barbato
<lu_zero@gentoo.org>
Sun, 23 Aug 2015 19:44:38 +0000
(21:44 +0200)
Avoid a division by zero.
Bug-Id: CID
1257655
libavcodec/libxavs.c
patch
|
blob
|
history
diff --git
a/libavcodec/libxavs.c
b/libavcodec/libxavs.c
index
f0f5dfd
..
43b0915
100644
(file)
--- a/
libavcodec/libxavs.c
+++ b/
libavcodec/libxavs.c
@@
-356,8
+356,9
@@
FF_ENABLE_DEPRECATION_WARNINGS
if (avctx->level > 0)
x4->params.i_level_idc = avctx->level;
- x4->params.rc.f_rate_tolerance =
- (float)avctx->bit_rate_tolerance/avctx->bit_rate;
+ if (avctx->bit_rate > 0)
+ x4->params.rc.f_rate_tolerance =
+ (float)avctx->bit_rate_tolerance / avctx->bit_rate;
if ((avctx->rc_buffer_size) &&
(avctx->rc_initial_buffer_occupancy <= avctx->rc_buffer_size)) {