avcodec/utils: Fix signed integer overflow in rc_initial_buffer_occupancy initialization
authorVitaly Buka <vitalybuka-at-google.com@ffmpeg.org>
Sun, 20 Aug 2017 18:56:47 +0000 (11:56 -0700)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 24 Aug 2017 10:03:33 +0000 (12:03 +0200)
commit616154a6a5352cbf3685f3bb494df8b5f4a8ebc0
tree67ff19e8fe1f388d0335dca8a2f755f648503def
parent2820ffe3923677361fa026175e0280f01af01516
avcodec/utils: Fix signed integer overflow in rc_initial_buffer_occupancy initialization

Signed integer overflow is undefined behavior.
Detected with clang and -fsanitize=signed-integer-overflow

Signed-off-by: Vitaly Buka <vitalybuka@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8c2bb10ddfef1f151b9455d152c9aca91140a4b0)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/utils.c