diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-05-31 00:46:47 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-31 00:46:47 +0200 |
commit | 57778f61d0ae2059ed95567f8e5b568fa817d33e (patch) | |
tree | 14f58d5984ef31d2c7cf5d0ed8066d79593b5745 /libavformat/avidec.c | |
parent | 76853a3e0ce4d4ef09ffcca7307991b8db832cd4 (diff) | |
download | ffmpeg-57778f61d0ae2059ed95567f8e5b568fa817d33e.tar.gz |
avidec: fix odd extradata size case.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r-- | libavformat/avidec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 1638e28674..24aacd04fd 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -602,7 +602,8 @@ static int avi_read_header(AVFormatContext *s) } if(size > 10*4 && size<(1<<30) && size < avi->fsize){ - st->codec->extradata_size= size - 10*4; + if(esize == size-1 && (esize&1)) st->codec->extradata_size= esize - 10*4; + else st->codec->extradata_size= size - 10*4; st->codec->extradata= av_malloc(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE); if (!st->codec->extradata) { st->codec->extradata_size= 0; |