[FFmpeg-cvslog] avidec: fix odd extradata size case.
Michael Niedermayer
git at videolan.org
Thu Jun 7 01:44:16 CEST 2012
ffmpeg | branch: release/0.11 | Michael Niedermayer <michaelni at gmx.at> | Thu May 31 00:46:47 2012 +0200| [eecbd9a78f38b3eaa04b9e0158b9c65559c3cba9] | committer: Michael Niedermayer
avidec: fix odd extradata size case.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 57778f61d0ae2059ed95567f8e5b568fa817d33e)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eecbd9a78f38b3eaa04b9e0158b9c65559c3cba9
---
libavformat/avidec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 1638e28..24aacd0 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;
More information about the ffmpeg-cvslog
mailing list