diff options
author | Dyami Caliri <dyami@dragonframe.com> | 2015-02-26 21:17:01 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-26 22:14:00 +0300 |
commit | 50833c9f7b4e1922197a8955669f8ab3589c8cef (patch) | |
tree | 6be84f8ce9233207b72499d91e6e55594f010631 /libavcodec/s302menc.c | |
parent | b851bc20c6931c084710e69f7eec30d8c1bdb68e (diff) |
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/s302menc.c')
-rw-r--r-- | libavcodec/s302menc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/s302menc.c b/libavcodec/s302menc.c index 540ac29dab..e738f09d19 100644 --- a/libavcodec/s302menc.c +++ b/libavcodec/s302menc.c @@ -82,7 +82,7 @@ static int s302m_encode2_frame(AVCodecContext *avctx, AVPacket *avpkt, return ret; o = avpkt->data; - init_put_bits(&pb, o, buf_size * 8); + init_put_bits(&pb, o, buf_size); put_bits(&pb, 16, buf_size - AES3_HEADER_LEN); put_bits(&pb, 2, (avctx->channels - 2) >> 1); // number of channels put_bits(&pb, 8, 0); // channel ID |