diff options
author | Alexandra Khirnova <alexandra.khirnova@gmail.com> | 2013-09-18 18:12:36 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2013-09-18 18:28:38 +0200 |
commit | 5626f994f273af80fb100d4743b963304de9e05c (patch) | |
tree | 69a48a5383a83d06f8e25df3098cce219788e873 /libavformat/avidec.c | |
parent | 0f310a6f333b016d336674d086045e8473fdf918 (diff) | |
download | ffmpeg-5626f994f273af80fb100d4743b963304de9e05c.tar.gz |
avformat: Use av_reallocp() where suitable
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r-- | libavformat/avidec.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 9aa6efe223..ea7ecab768 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -655,10 +655,11 @@ static int avi_read_header(AVFormatContext *s) if (st->codec->codec_tag == 0 && st->codec->height > 0 && st->codec->extradata_size < 1U << 30) { st->codec->extradata_size += 9; - st->codec->extradata = av_realloc(st->codec->extradata, - st->codec->extradata_size + - FF_INPUT_BUFFER_PADDING_SIZE); - if (st->codec->extradata) + if ((ret = av_reallocp(&st->codec->extradata, + st->codec->extradata_size + + FF_INPUT_BUFFER_PADDING_SIZE)) < 0) + return ret; + else memcpy(st->codec->extradata + st->codec->extradata_size - 9, "BottomUp", 9); } |