aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rtmphttp.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-19 11:01:26 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-19 11:01:26 +0200
commit20dfab33f5ab61fc51de65192ed239f8b62782a2 (patch)
treef5164b3f79ab48e4dd4c027bef968666f7748716 /libavformat/rtmphttp.c
parentf54d751f33375054d4ecf30301ef008c8e781f99 (diff)
parent5626f994f273af80fb100d4743b963304de9e05c (diff)
downloadffmpeg-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/rtmphttp.c')
-rw-r--r--libavformat/rtmphttp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libavformat/rtmphttp.c b/libavformat/rtmphttp.c
index 3a51f7c429..6302304572 100644
--- a/libavformat/rtmphttp.c
+++ b/libavformat/rtmphttp.c
@@ -85,14 +85,12 @@ static int rtmp_http_send_cmd(URLContext *h, const char *cmd)
static int rtmp_http_write(URLContext *h, const uint8_t *buf, int size)
{
RTMP_HTTPContext *rt = h->priv_data;
- void *ptr;
if (rt->out_size + size > rt->out_capacity) {
+ int err;
rt->out_capacity = (rt->out_size + size) * 2;
- ptr = av_realloc(rt->out_data, rt->out_capacity);
- if (!ptr)
- return AVERROR(ENOMEM);
- rt->out_data = ptr;
+ if ((err = av_reallocp(&rt->out_data, rt->out_capacity)) < 0)
+ return err;
}
memcpy(rt->out_data + rt->out_size, buf, size);