url_fskip(pb, 20);
if (size > 40) {
st->codec.extradata_size = size - 40;
- st->codec.extradata = av_mallocz(st->codec.extradata_size);
+ st->codec.extradata = av_mallocz(st->codec.extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
get_buffer(pb, st->codec.extradata, st->codec.extradata_size);
}
get_le32(pb); /* ClrImportant */
st->codec.extradata_size= size - 10*4;
- st->codec.extradata= av_malloc(st->codec.extradata_size);
+ st->codec.extradata= av_malloc(st->codec.extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
get_buffer(pb, st->codec.extradata, st->codec.extradata_size);
if(st->codec.extradata_size & 1) //FIXME check if the encoder really did this correctly
#ifdef DEBUG
av_log(NULL, AV_LOG_DEBUG, "Specific MPEG4 header len=%d\n", len);
#endif
- st->codec.extradata = (uint8_t*) av_mallocz(len);
+ st->codec.extradata = (uint8_t*) av_mallocz(len + FF_INPUT_BUFFER_PADDING_SIZE);
if (st->codec.extradata) {
get_buffer(pb, st->codec.extradata, len);
st->codec.extradata_size = len;
// this should be fixed and just SMI header should be passed
av_free(st->codec.extradata);
st->codec.extradata_size = 0x5a + atom.size;
- st->codec.extradata = (uint8_t*) av_mallocz(st->codec.extradata_size);
+ st->codec.extradata = (uint8_t*) av_mallocz(st->codec.extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
if (st->codec.extradata) {
strcpy(st->codec.extradata, "SVQ3"); // fake
/* codec specific data headers */
while(get_v(bc) != 0){
st->codec.extradata_size= get_v(bc);
- st->codec.extradata= av_mallocz(st->codec.extradata_size);
+ st->codec.extradata= av_mallocz(st->codec.extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
get_buffer(bc, st->codec.extradata, st->codec.extradata_size);
// url_fskip(bc, get_v(bc));
}
return -1;
}
codec->extradata_size+= 2 + op.bytes;
- codec->extradata= av_realloc(codec->extradata, codec->extradata_size);
+ codec->extradata= av_realloc(codec->extradata, codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
p= codec->extradata + codec->extradata_size - 2 - op.bytes;
*(p++)= op.bytes>>8;
*(p++)= op.bytes&0xFF;
if (!strcmp(attr, "config")) {
/* decode the hexa encoded parameter */
len = hex_to_data(NULL, value);
- codec->extradata = av_mallocz(len);
+ codec->extradata = av_mallocz(len + FF_INPUT_BUFFER_PADDING_SIZE);
if (!codec->extradata)
goto fail;
codec->extradata_size = len;
if (codec->extradata_size > 0) {
if (codec->extradata_size > size - 18)
codec->extradata_size = size - 18;
- codec->extradata = av_mallocz(codec->extradata_size);
+ codec->extradata = av_mallocz(codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
get_buffer(pb, codec->extradata, codec->extradata_size);
} else
codec->extradata_size = 0;