summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-11 13:34:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-11 13:38:53 +0200
commit2a1c24a267e960cde49cf0d1f94d07ffe768c301 (patch)
tree41e0c6fabf1d944faf89cd7f1d97a06a1dd10092 /libavformat
parentc5714097eb4c5545f41b5dcb522f7d7470d6f733 (diff)
avformat/utils: use av_realloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 4d4b701baa..af0284d709 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3300,7 +3300,7 @@ AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c)
if (s->nb_streams >= INT_MAX/sizeof(*streams))
return NULL;
- streams = av_realloc(s->streams, (s->nb_streams + 1) * sizeof(*streams));
+ streams = av_realloc_array(s->streams, s->nb_streams + 1, sizeof(*streams));
if (!streams)
return NULL;
s->streams = streams;
@@ -3422,7 +3422,7 @@ void ff_program_add_stream_index(AVFormatContext *ac, int progid, unsigned int i
if(program->stream_index[j] == idx)
return;
- tmp = av_realloc(program->stream_index, sizeof(unsigned int)*(program->nb_stream_indexes+1));
+ tmp = av_realloc_array(program->stream_index, program->nb_stream_indexes+1, sizeof(unsigned int));
if(!tmp)
return;
program->stream_index = tmp;