summaryrefslogtreecommitdiff
path: root/libavformat/avidec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r--libavformat/avidec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index ea7ecab768..1212c6a09b 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -657,9 +657,10 @@ static int avi_read_header(AVFormatContext *s)
st->codec->extradata_size += 9;
if ((ret = av_reallocp(&st->codec->extradata,
st->codec->extradata_size +
- FF_INPUT_BUFFER_PADDING_SIZE)) < 0)
+ FF_INPUT_BUFFER_PADDING_SIZE)) < 0) {
+ st->codec->extradata_size = 0;
return ret;
- else
+ } else
memcpy(st->codec->extradata + st->codec->extradata_size - 9,
"BottomUp", 9);
}