aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/movenchint.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-19 11:01:26 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-19 11:01:26 +0200
commit20dfab33f5ab61fc51de65192ed239f8b62782a2 (patch)
treef5164b3f79ab48e4dd4c027bef968666f7748716 /libavformat/movenchint.c
parentf54d751f33375054d4ecf30301ef008c8e781f99 (diff)
parent5626f994f273af80fb100d4743b963304de9e05c (diff)
downloadffmpeg-20dfab33f5ab61fc51de65192ed239f8b62782a2.tar.gz
Merge commit '5626f994f273af80fb100d4743b963304de9e05c'
* commit '5626f994f273af80fb100d4743b963304de9e05c': avformat: Use av_reallocp() where suitable Conflicts: libavformat/avidec.c libavformat/avienc.c libavformat/aviobuf.c libavformat/oggparsevorbis.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/movenchint.c')
-rw-r--r--libavformat/movenchint.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libavformat/movenchint.c b/libavformat/movenchint.c
index 943680e9ad..d0d0d218fd 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;