aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/flashsvenc.c
diff options
context:
space:
mode:
authorDyami Caliri <dyami@dragonframe.com>2015-02-26 10:17:01 -0800
committerMichael Niedermayer <michaelni@gmx.at>2015-03-14 14:27:23 +0100
commit265ad094a8cbf071f24a32370a7ed3e2e7539e5a (patch)
tree7287538288a0e888a68af585ab1d92566d58167a /libavcodec/flashsvenc.c
parentb9d09fb8c9998a533289c2fd9db8792570c9ff8f (diff)
downloadffmpeg-265ad094a8cbf071f24a32370a7ed3e2e7539e5a.tar.gz
Fix buffer_size argument to init_put_bits() in multiple encoders.
Several encoders were multiplying the buffer size by 8, in order to get a bit size. However, the buffer_size argument is for the byte size of the buffer. We had experienced crashes encoding prores (Anatoliy) at size 4096x4096. (cherry picked from commit 50833c9f7b4e1922197a8955669f8ab3589c8cef) Conflicts: libavcodec/proresenc_kostya.c
Diffstat (limited to 'libavcodec/flashsvenc.c')
-rw-r--r--libavcodec/flashsvenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c
index 7ad15f118f..6d406e9fa6 100644
--- a/libavcodec/flashsvenc.c
+++ b/libavcodec/flashsvenc.c
@@ -151,7 +151,7 @@ static int encode_bitstream(FlashSVContext *s, const AVFrame *p, uint8_t *buf,
int buf_pos, res;
int pred_blocks = 0;
- init_put_bits(&pb, buf, buf_size * 8);
+ init_put_bits(&pb, buf, buf_size);
put_bits(&pb, 4, block_width / 16 - 1);
put_bits(&pb, 12, s->image_width);