avformat/movenchint: revert "Use av_reallocp() where suitable"
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 22 Sep 2013 12:59:25 +0000 (14:59 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 22 Sep 2013 13:00:08 +0000 (15:00 +0200)
reverts movenchin part of 5626f994f273af80fb100d4743b963304de9e05c
The change left the fields in an inconsistent state

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/movenchint.c

index d0d0d21..943680e 100644 (file)
@@ -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;