summaryrefslogtreecommitdiffstats
path: root/libavcodec/proresenc_anatoliy.c
diff options
context:
space:
mode:
authorDyami Caliri <dyami@dragonframe.com>2015-02-26 10:17:01 -0800
committerMichael Niedermayer <michaelni@gmx.at>2015-02-26 20:14:00 +0100
commit50833c9f7b4e1922197a8955669f8ab3589c8cef (patch)
tree6be84f8ce9233207b72499d91e6e55594f010631 /libavcodec/proresenc_anatoliy.c
parentb851bc20c6931c084710e69f7eec30d8c1bdb68e (diff)
downloadffmpeg-streaming-50833c9f7b4e1922197a8955669f8ab3589c8cef.zip
ffmpeg-streaming-50833c9f7b4e1922197a8955669f8ab3589c8cef.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.
Diffstat (limited to 'libavcodec/proresenc_anatoliy.c')
-rw-r--r--libavcodec/proresenc_anatoliy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index f471f49..801d58e 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -304,7 +304,7 @@ static int encode_slice_plane(AVCodecContext *avctx, int mb_count,
}
blocks_per_slice = mb_count << (2 - chroma);
- init_put_bits(&pb, buf, buf_size << 3);
+ init_put_bits(&pb, buf, buf_size);
encode_dc_coeffs(&pb, blocks, blocks_per_slice, qmat);
encode_ac_coeffs(avctx, &pb, blocks, blocks_per_slice, qmat);
OpenPOWER on IntegriCloud