[FFmpeg-cvslog] aviobuf: Replace av_realloc by av_realloc_f when relevant.

Nicolas George git at videolan.org
Sat Oct 1 21:38:55 CEST 2011


ffmpeg | branch: release/0.8 | Nicolas George <nicolas.george at normalesup.org> | Wed Sep 28 17:16:11 2011 +0200| [431937883f5d10b461fd8c6ee5a11abc7af8c9b2] | committer: Michael Niedermayer

aviobuf: Replace av_realloc by av_realloc_f when relevant.

Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 247a1dc84716cb033b538a5bd5ba8b33de0e8260)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=431937883f5d10b461fd8c6ee5a11abc7af8c9b2
---

 libavformat/aviobuf.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index aad0240..c6a67c3 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -921,7 +921,7 @@ int ffio_rewind_with_probe_data(AVIOContext *s, unsigned char *buf, int buf_size
 
     alloc_size = FFMAX(s->buffer_size, new_size);
     if (alloc_size > buf_size)
-        if (!(buf = av_realloc(buf, alloc_size)))
+        if (!(buf = av_realloc_f(buf, 1, alloc_size)))
             return AVERROR(ENOMEM);
 
     if (new_size > buf_size) {
@@ -1090,7 +1090,7 @@ static int dyn_buf_write(void *opaque, uint8_t *buf, int buf_size)
     }
 
     if (new_allocated_size > d->allocated_size) {
-        d->buffer = av_realloc(d->buffer, new_allocated_size);
+        d->buffer = av_realloc_f(d->buffer, 1, new_allocated_size);
         if(d->buffer == NULL)
              return AVERROR(ENOMEM);
         d->allocated_size = new_allocated_size;



More information about the ffmpeg-cvslog mailing list