aboutsummaryrefslogtreecommitdiffstats
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-03-29 03:34:22 +0200
commitbcbae2d95fc5e5df6116200f7a249ebb4805e415 (patch)
tree2fd047cf962cabc02e25ffef470f27371be26a55 /libavcodec/faxcompr.c
parent198aa9fabde1d6e13accdcc49f792b33b94986ca (diff)
downloadffmpeg-bcbae2d95fc5e5df6116200f7a249ebb4805e415.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) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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 155f78da66..ba7096d3b1 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;