diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-22 14:59:25 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-09-22 15:00:08 +0200 |
commit | 091ba02cc83610b329abc488d159bfb42cb77b49 (patch) | |
tree | 6e408c2ab8052dbd5e90fb52b75ab3971caaf7ed /libavformat/movenchint.c | |
parent | 361bc707319d4c4f121cf5841602b073f4ec2388 (diff) | |
download | ffmpeg-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.c | 5 |
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; |