Browse code

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@gmail.com>

Lukasz Marek authored on 2015/02/05 09:04:45
Showing 1 changed files
... ...
@@ -180,7 +180,7 @@ int ff_avc_write_annexb_extradata(const uint8_t *in, uint8_t **buf, int *size)
180 180
     if (11 + sps_size + pps_size > *size)
181 181
         return AVERROR_INVALIDDATA;
182 182
     out_size = 8 + sps_size + pps_size;
183
-    out = av_mallocz(out_size);
183
+    out = av_mallocz(out_size + FF_INPUT_BUFFER_PADDING_SIZE);
184 184
     if (!out)
185 185
         return AVERROR(ENOMEM);
186 186
     AV_WB32(&out[0], 0x00000001);