1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-10 19:35:05 +02:00

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

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-09-22 14:59:25 +02:00
parent 361bc70731
commit 091ba02cc8

View 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;