diff options
author | Alexandra Khirnova <alexandra.khirnova@gmail.com> | 2013-09-18 18:12:36 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2013-09-18 18:28:38 +0200 |
commit | 5626f994f273af80fb100d4743b963304de9e05c (patch) | |
tree | 69a48a5383a83d06f8e25df3098cce219788e873 /libavformat/movenchint.c | |
parent | 0f310a6f333b016d336674d086045e8473fdf918 (diff) | |
download | ffmpeg-5626f994f273af80fb100d4743b963304de9e05c.tar.gz |
avformat: Use av_reallocp() where suitable
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavformat/movenchint.c')
-rw-r--r-- | libavformat/movenchint.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libavformat/movenchint.c b/libavformat/movenchint.c index 05a43cf6a9..457081582a 100644 --- a/libavformat/movenchint.c +++ b/libavformat/movenchint.c @@ -104,12 +104,9 @@ 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; - samples = av_realloc(queue->samples, sizeof(HintSample)*queue->size); - if (!samples) + if (av_reallocp(&queue->samples, sizeof(*queue->samples) * queue->size) < 0) return; - queue->samples = samples; } queue->samples[queue->len].data = data; queue->samples[queue->len].size = size; |