diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-19 13:01:26 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-09-19 13:01:26 +0400 |
commit | 20dfab33f5ab61fc51de65192ed239f8b62782a2 (patch) | |
tree | f5164b3f79ab48e4dd4c027bef968666f7748716 /libavformat/aviobuf.c | |
parent | f54d751f33375054d4ecf30301ef008c8e781f99 (diff) | |
parent | 5626f994f273af80fb100d4743b963304de9e05c (diff) |
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/aviobuf.c')
-rw-r--r-- | libavformat/aviobuf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 3707fda8bf..652b7769fb 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -949,9 +949,9 @@ static int dyn_buf_write(void *opaque, uint8_t *buf, int buf_size) } if (new_allocated_size > d->allocated_size) { - d->buffer = av_realloc_f(d->buffer, 1, new_allocated_size); - if(d->buffer == NULL) - return AVERROR(ENOMEM); + int err; + if ((err = av_reallocp(&d->buffer, new_allocated_size)) < 0) + return err; d->allocated_size = new_allocated_size; } memcpy(d->buffer + d->pos, buf, buf_size); |