aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/movenchint.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-22 14:59:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-22 15:00:08 +0200
commit091ba02cc83610b329abc488d159bfb42cb77b49 (patch)
tree6e408c2ab8052dbd5e90fb52b75ab3971caaf7ed /libavformat/movenchint.c
parent361bc707319d4c4f121cf5841602b073f4ec2388 (diff)
downloadffmpeg-091ba02cc83610b329abc488d159bfb42cb77b49.tar.gz
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@gmx.at>
Diffstat (limited to 'libavformat/movenchint.c')
-rw-r--r--libavformat/movenchint.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/movenchint.c b/libavformat/movenchint.c
index d0d0d218fd..943680e9ad 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;