Commit 63621762 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/movenchint: only change queue size if reallocation succeeded

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 091ba02c
......@@ -105,10 +105,10 @@ static void sample_queue_push(HintSampleQueue *queue, uint8_t *data, int size,
return;
if (!queue->samples || queue->len >= queue->size) {
HintSample *samples;
queue->size += 10;
samples = av_realloc(queue->samples, sizeof(HintSample)*queue->size);
samples = av_realloc(queue->samples, sizeof(HintSample) * (queue->size + 10));
if (!samples)
return;
queue->size += 10;
queue->samples = samples;
}
queue->samples[queue->len].data = data;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment