[FFmpeg-cvslog] avformat/movenchint: revert "Use av_reallocp() where suitable"

Michael Niedermayer git at videolan.org
Sun Sep 22 15:52:04 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Sep 22 14:59:25 2013 +0200| [091ba02cc83610b329abc488d159bfb42cb77b49] | committer: Michael Niedermayer

avformat/movenchint: revert "Use av_reallocp() where suitable"

reverts movenchin part of 5626f994f273af80fb100d4743b963304de9e05c
The change left the fields in an inconsistent state

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/movenchint.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavformat/movenchint.c b/libavformat/movenchint.c
index d0d0d21..943680e 100644
--- a/libavformat/movenchint.c
+++ b/libavformat/movenchint.c
@@ -104,9 +104,12 @@ static void sample_queue_push(HintSampleQueue *queue, uint8_t *data, int size,
     if (size <= 14)
         return;
     if (!queue->samples || queue->len >= queue->size) {
+        HintSample *samples;
         queue->size += 10;
-        if (av_reallocp(&queue->samples, sizeof(*queue->samples) * queue->size) < 0)
+        samples = av_realloc(queue->samples, sizeof(HintSample)*queue->size);
+        if (!samples)
             return;
+        queue->samples = samples;
     }
     queue->samples[queue->len].data = data;
     queue->samples[queue->len].size = size;



More information about the ffmpeg-cvslog mailing list