Commit 4b1acf75 authored by mru's avatar mru

extradata may be used as bitstream reader input so allocate with padding


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@5547 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 36b251ff
...@@ -1995,8 +1995,9 @@ int av_find_stream_info(AVFormatContext *ic) ...@@ -1995,8 +1995,9 @@ int av_find_stream_info(AVFormatContext *ic)
int i= st->parser->parser->split(st->codec, pkt->data, pkt->size); int i= st->parser->parser->split(st->codec, pkt->data, pkt->size);
if(i){ if(i){
st->codec->extradata_size= i; st->codec->extradata_size= i;
st->codec->extradata= av_malloc(st->codec->extradata_size); st->codec->extradata= av_malloc(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
memcpy(st->codec->extradata, pkt->data, st->codec->extradata_size); memcpy(st->codec->extradata, pkt->data, st->codec->extradata_size);
memset(st->codec->extradata + i, 0, FF_INPUT_BUFFER_PADDING_SIZE);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment