diff options
author | Dyami Caliri <dyami@dragonframe.com> | 2015-02-26 10:17:01 -0800 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-26 20:14:00 +0100 |
commit | 50833c9f7b4e1922197a8955669f8ab3589c8cef (patch) | |
tree | 6be84f8ce9233207b72499d91e6e55594f010631 /libavcodec/adpcmenc.c | |
parent | b851bc20c6931c084710e69f7eec30d8c1bdb68e (diff) | |
download | ffmpeg-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/adpcmenc.c')
-rw-r--r-- | libavcodec/adpcmenc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c index 68164630f4..50872c3e46 100644 --- a/libavcodec/adpcmenc.c +++ b/libavcodec/adpcmenc.c @@ -541,7 +541,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, case AV_CODEC_ID_ADPCM_IMA_QT: { PutBitContext pb; - init_put_bits(&pb, dst, pkt_size * 8); + init_put_bits(&pb, dst, pkt_size); for (ch = 0; ch < avctx->channels; ch++) { ADPCMChannelStatus *status = &c->status[ch]; @@ -571,7 +571,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, case AV_CODEC_ID_ADPCM_SWF: { PutBitContext pb; - init_put_bits(&pb, dst, pkt_size * 8); + init_put_bits(&pb, dst, pkt_size); n = frame->nb_samples - 1; |