diff options
author | Alex Converse <alex.converse@gmail.com> | 2010-03-07 21:16:44 +0000 |
---|---|---|
committer | Alex Converse <alex.converse@gmail.com> | 2010-03-07 21:16:44 +0000 |
commit | 0f8e4dfe6ed913741e4711c6e7deb3272de2f164 (patch) | |
tree | 537950f767960377bb04b88f8b1f67cc2e535f7b /libavcodec | |
parent | 57cb8d98310ec2db8d44376032b96435724c83f4 (diff) | |
download | ffmpeg-0f8e4dfe6ed913741e4711c6e7deb3272de2f164.tar.gz |
Increase FF_INPUT_BUFFER_PADDING_SIZE to 64.
The purpose of this is to give decoders a reasonable amount of buffer to work
with before needing to check for overreads.
Originally committed as revision 22288 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/avcodec.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 31569d3406..3e0e291132 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -424,12 +424,14 @@ enum SampleFormat { /** * Required number of additionally allocated bytes at the end of the input bitstream for decoding. - * This is mainly needed because some optimized bitstream readers read - * 32 or 64 bit at once and could read over the end.<br> + * The first 8 bytes are needed because some optimized bitstream readers read + * 32 or 64 bit at once and could read over the end. The remainder is to give + * decoders a reasonable amount of distance to work with before checking for + * buffer overreads.<br> * Note: If the first 23 bits of the additional bytes are not 0, then damaged * MPEG bitstreams could cause overread and segfault. */ -#define FF_INPUT_BUFFER_PADDING_SIZE 8 +#define FF_INPUT_BUFFER_PADDING_SIZE 64 /** * minimum encoding buffer size |