diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-04-01 17:40:30 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-04-01 17:43:25 +0200 |
commit | 5b32558fd805c48035d6e0c23b4807c81286ee34 (patch) | |
tree | db19da12b73f3bcaa2f616f0fac7dd8bda39ab98 | |
parent | c49e7924a8b537f2cda0da8627641fb97528fc11 (diff) | |
download | ffmpeg-5b32558fd805c48035d6e0c23b4807c81286ee34.tar.gz |
tools/sidxindex: Use av_*malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | tools/sidxindex.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/sidxindex.c b/tools/sidxindex.c index e376428f75..504c59588c 100644 --- a/tools/sidxindex.c +++ b/tools/sidxindex.c @@ -156,8 +156,8 @@ static int handle_file(struct Tracks *tracks, const char *file) err = AVERROR(ENOMEM); goto fail; } - temp = av_realloc(tracks->tracks, - sizeof(*tracks->tracks) * (tracks->nb_tracks + 1)); + temp = av_realloc_array(tracks->tracks, tracks->nb_tracks + 1, + sizeof(*tracks->tracks)); if (!temp) { av_free(track); err = AVERROR(ENOMEM); @@ -244,7 +244,7 @@ static int output_mpd(struct Tracks *tracks, const char *filename) nb_tracks = nb_tracks_buf; nb_sets = 2; for (i = 0; i < 2; i++) { - adaptation_sets[i] = av_malloc(sizeof(*adaptation_sets[i]) * tracks->nb_tracks); + adaptation_sets[i] = av_malloc_array(tracks->nb_tracks, sizeof(*adaptation_sets[i])); if (!adaptation_sets[i]) { ret = AVERROR(ENOMEM); goto err; |