[FFmpeg-devel] [PATCH] avcodec: add AVCODEC_REQUIRED_INPUT_BUFFER_PADDING_SIZE, split FF_INPUT_BUFFER_PADDING_SIZE

Michael Niedermayer michaelni at gmx.at
Thu Jun 12 23:06:13 CEST 2014


TODO bump minor version, update APIChanges

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 libavcodec/avcodec.h |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 68b1f26..ca66f3c 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -608,13 +608,22 @@ typedef struct AVCodecDescriptor {
 
 /**
  * @ingroup lavc_decoding
+ * The amount of padding that is allocated at the end of the input bitstream by
+ * libavformat and other libs, this affects all buffers which may reasonably be
+ * directly used as avcodec input buffers.
+ * The value of this symbol may be increased without major version bump.
+ */
+#define FF_INPUT_BUFFER_PADDING_SIZE 32
+
+/**
+ * @ingroup lavc_decoding
  * 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>
  * 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 32
+#define AVCODEC_REQUIRED_INPUT_BUFFER_PADDING_SIZE 16
 
 /**
  * @ingroup lavc_encoding
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list