[FFmpeg-cvslog] lavf/avc: add buffer padding to extradata allocation

Lukasz Marek git at videolan.org
Thu Feb 5 03:29:58 CET 2015


ffmpeg | branch: master | Lukasz Marek <lukasz.m.luki2 at gmail.com> | Thu Feb  5 01:04:45 2015 +0100| [21051af218d7a6fdfc16036980577cf1765f5cbc] | committer: Lukasz Marek

lavf/avc: add buffer padding to extradata allocation

ff_avc_write_annexb_extradata() allocates extradata, but don't add
FF_INPUT_BUFFER_PADDING_SIZE value

Signed-off-by: Lukasz Marek <lukasz.m.luki2 at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=21051af218d7a6fdfc16036980577cf1765f5cbc
---

 libavformat/avc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/avc.c b/libavformat/avc.c
index c927b47..9d843e0 100644
--- a/libavformat/avc.c
+++ b/libavformat/avc.c
@@ -180,7 +180,7 @@ int ff_avc_write_annexb_extradata(const uint8_t *in, uint8_t **buf, int *size)
     if (11 + sps_size + pps_size > *size)
         return AVERROR_INVALIDDATA;
     out_size = 8 + sps_size + pps_size;
-    out = av_mallocz(out_size);
+    out = av_mallocz(out_size + FF_INPUT_BUFFER_PADDING_SIZE);
     if (!out)
         return AVERROR(ENOMEM);
     AV_WB32(&out[0], 0x00000001);



More information about the ffmpeg-cvslog mailing list