Mercurial > libavcodec.hg
comparison avcodec.h @ 11389:7b9896e85410 libavcodec
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.
author | alexc |
---|---|
date | Sun, 07 Mar 2010 21:16:44 +0000 |
parents | ee2e050815be |
children | 384d803faff4 |
comparison
equal
deleted
inserted
replaced
11388:404629a45da1 | 11389:7b9896e85410 |
---|---|
422 /* in bytes */ | 422 /* in bytes */ |
423 #define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio | 423 #define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio |
424 | 424 |
425 /** | 425 /** |
426 * Required number of additionally allocated bytes at the end of the input bitstream for decoding. | 426 * Required number of additionally allocated bytes at the end of the input bitstream for decoding. |
427 * This is mainly needed because some optimized bitstream readers read | 427 * The first 8 bytes are needed because some optimized bitstream readers read |
428 * 32 or 64 bit at once and could read over the end.<br> | 428 * 32 or 64 bit at once and could read over the end. The remainder is to give |
429 * decoders a reasonable amount of distance to work with before checking for | |
430 * buffer overreads.<br> | |
429 * Note: If the first 23 bits of the additional bytes are not 0, then damaged | 431 * Note: If the first 23 bits of the additional bytes are not 0, then damaged |
430 * MPEG bitstreams could cause overread and segfault. | 432 * MPEG bitstreams could cause overread and segfault. |
431 */ | 433 */ |
432 #define FF_INPUT_BUFFER_PADDING_SIZE 8 | 434 #define FF_INPUT_BUFFER_PADDING_SIZE 64 |
433 | 435 |
434 /** | 436 /** |
435 * minimum encoding buffer size | 437 * minimum encoding buffer size |
436 * Used to avoid some checks during header writing. | 438 * Used to avoid some checks during header writing. |
437 */ | 439 */ |