mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-08-10 11:25:05 +02:00
avformat/movenchint: only change queue size if reallocation succeeded
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
091ba02cc8
commit
63621762ec
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user