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/rtpdec_asf.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/rtpdec_asf.c')
-rw-r--r-- | libavformat/rtpdec_asf.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libavformat/rtpdec_asf.c b/libavformat/rtpdec_asf.c index 35603f29e9..123894f275 100644 --- a/libavformat/rtpdec_asf.c +++ b/libavformat/rtpdec_asf.c @@ -239,14 +239,11 @@ static int asfrtp_parse_packet(AVFormatContext *s, PayloadContext *asf, int cur_len = start_off + len_off - off; int prev_len = out_len; - void *newmem; out_len += cur_len; if (FFMIN(cur_len, len - off) < 0) return -1; - newmem = av_realloc(asf->buf, out_len); - if (!newmem) - return -1; - asf->buf = newmem; + if ((res = av_reallocp(&asf->buf, out_len)) < 0) + return res; memcpy(asf->buf + prev_len, buf + off, FFMIN(cur_len, len - off)); avio_skip(pb, cur_len); |