summaryrefslogtreecommitdiff
path: root/ffmpeg/libavformat/rtpdec_asf.c
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
committerTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
commitf7813a5324be39d13ab536c245d15dfc602a7849 (patch)
treefad99148b88823d34a5df2f0a25881a002eb291b /ffmpeg/libavformat/rtpdec_asf.c
parentb7a5a477b8ff4d4e3028b9dfb9a9df0a41463f92 (diff)
basic type mechanism working
Diffstat (limited to 'ffmpeg/libavformat/rtpdec_asf.c')
-rw-r--r--ffmpeg/libavformat/rtpdec_asf.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/ffmpeg/libavformat/rtpdec_asf.c b/ffmpeg/libavformat/rtpdec_asf.c
index 35603f2..123894f 100644
--- a/ffmpeg/libavformat/rtpdec_asf.c
+++ b/ffmpeg/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);