diff options
author | Måns Rullgård <mans@mansr.com> | 2006-06-29 19:42:34 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2006-06-29 19:42:34 +0000 |
commit | 62c52121e0c2bbad35ed684a12b4da2fc1a9682a (patch) | |
tree | b5fbfe22acd3193f7cc78034a6bf7b69904eac88 | |
parent | 25c533a2c220e7657477605e8f34e2bd94fe0375 (diff) | |
download | ffmpeg-62c52121e0c2bbad35ed684a12b4da2fc1a9682a.tar.gz |
extradata may be used as bitstream reader input so allocate with padding
Originally committed as revision 5547 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 74ec667d91..3826df3f0a 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1995,8 +1995,9 @@ int av_find_stream_info(AVFormatContext *ic) int i= st->parser->parser->split(st->codec, pkt->data, pkt->size); if(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); + memset(st->codec->extradata + i, 0, FF_INPUT_BUFFER_PADDING_SIZE); } } |