diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-19 11:01:26 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-09-19 11:01:26 +0200 |
commit | 20dfab33f5ab61fc51de65192ed239f8b62782a2 (patch) | |
tree | f5164b3f79ab48e4dd4c027bef968666f7748716 /libavformat/oggparsetheora.c | |
parent | f54d751f33375054d4ecf30301ef008c8e781f99 (diff) | |
parent | 5626f994f273af80fb100d4743b963304de9e05c (diff) | |
download | ffmpeg-20dfab33f5ab61fc51de65192ed239f8b62782a2.tar.gz |
Merge commit '5626f994f273af80fb100d4743b963304de9e05c'
* commit '5626f994f273af80fb100d4743b963304de9e05c':
avformat: Use av_reallocp() where suitable
Conflicts:
libavformat/avidec.c
libavformat/avienc.c
libavformat/aviobuf.c
libavformat/oggparsevorbis.c
libavformat/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/oggparsetheora.c')
-rw-r--r-- | libavformat/oggparsetheora.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c index 6877d1e06c..a1f5264b91 100644 --- a/libavformat/oggparsetheora.c +++ b/libavformat/oggparsetheora.c @@ -42,7 +42,7 @@ theora_header (AVFormatContext * s, int idx) struct ogg_stream *os = ogg->streams + idx; AVStream *st = s->streams[idx]; struct theora_params *thp = os->private; - int cds = st->codec->extradata_size + os->psize + 2; + int cds = st->codec->extradata_size + os->psize + 2, err; uint8_t *cdp; if(!(os->buf[os->pstart] & 0x80)) @@ -123,8 +123,9 @@ theora_header (AVFormatContext * s, int idx) return -1; } - st->codec->extradata = av_realloc (st->codec->extradata, - cds + FF_INPUT_BUFFER_PADDING_SIZE); + if ((err = av_reallocp(&st->codec->extradata, + cds + FF_INPUT_BUFFER_PADDING_SIZE)) < 0) + return err; cdp = st->codec->extradata + st->codec->extradata_size; *cdp++ = os->psize >> 8; *cdp++ = os->psize & 0xff; |