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
the init_put_bits()
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.

Regards,
Dyami

Attachment: fix_init_put_bits.patch.tar
Description: Unix tar archive

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to