diff options
author | Dyami Caliri <dyami@dragonframe.com> | 2015-02-26 10:17:01 -0800 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-10 02:13:09 +0200 |
commit | 5ae61395afe63f4f5e24f6f1e7bc6f38f0e49c24 (patch) | |
tree | ab39b8b9d6468d518cf2549ec0e296f3528baf00 /libavcodec/proresenc_kostya.c | |
parent | 1697813db84aa16fcf5c56af674aa5b6c77e7b3a (diff) | |
download | ffmpeg-5ae61395afe63f4f5e24f6f1e7bc6f38f0e49c24.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/proresenc_kostya.c')
-rw-r--r-- | libavcodec/proresenc_kostya.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c index ab434301b4..c009ed671e 100644 --- a/libavcodec/proresenc_kostya.c +++ b/libavcodec/proresenc_kostya.c @@ -1022,7 +1022,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, bytestream_put_byte(&buf, slice_hdr_size << 3); slice_hdr = buf; buf += slice_hdr_size - 1; - init_put_bits(&pb, buf, (pkt_size - (buf - orig_buf)) * 8); + init_put_bits(&pb, buf, (pkt_size - (buf - orig_buf))); ret = encode_slice(avctx, pic, &pb, sizes, x, y, q, mbs_per_slice); if (ret < 0) return ret; |