Commit 57778f61 authored by Michael Niedermayer's avatar Michael Niedermayer

avidec: fix odd extradata size case.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 76853a3e
......@@ -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;
......
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