avidec: fix odd extradata size case.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 57778f61d0ae2059ed95567f8e5b568fa817d33e) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
a441a96eb2
commit
eecbd9a78f
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user