allocate a few bytes more for extradata so the bitstream reader if its used by the codec for parsing extardata, doesnt read over the end

Originally committed as revision 3679 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer
2004-11-13 01:27:35 +00:00
parent 4940ed6ae1
commit 3129cd0140
7 changed files with 8 additions and 8 deletions

View File

@@ -274,7 +274,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap)
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);
}