summaryrefslogtreecommitdiff
path: root/libavcodec/faxcompr.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/faxcompr.c
parentb851bc20c6931c084710e69f7eec30d8c1bdb68e (diff)
downloadffmpeg-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/faxcompr.c')
-rw-r--r--libavcodec/faxcompr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/faxcompr.c b/libavcodec/faxcompr.c
index b65f2e24e1..eb39ae0b20 100644
--- a/libavcodec/faxcompr.c
+++ b/libavcodec/faxcompr.c
@@ -251,7 +251,7 @@ static void put_line(uint8_t *dst, int size, int width, const int *runs)
PutBitContext pb;
int run, mode = ~0, pix_left = width, run_idx = 0;
- init_put_bits(&pb, dst, size * 8);
+ init_put_bits(&pb, dst, size);
while (pix_left > 0) {
run = runs[run_idx++];
mode = ~mode;