[FFmpeg-devel] bad arguments to init_put_bits
dyami at dragonframe.com
Thu Feb 26 19:42:06 CET 2015
The init_put_bits() function (in libavcodec/put_bits.h) takes a buffer and
a buffer size (in bytes). Several of the encoders are passing the buffer
size in bits, by multiplying the buffer size by 8. This is incorrect.
We saw this problem when encoding a ProRes (Anatoliy) file at size
4096x4096. Debugging showed that the buffer size was very large, and when
multiplied by 8, it was interpreted as a negative number. This caused
to zero out the buffer, leading to a crash.
The attached patch fixes the argument to init_put_bits in all of the cases
where the buffer size was multiplied by 8.
You could use the patch or make the same change.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7680 bytes
Desc: not available
More information about the ffmpeg-devel