forked from FFmpeg/FFmpeg
tools/ismindex.c: Use av_realloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
a0a7b154bb
commit
dede2f7fc4
1 changed files with 3 additions and 2 deletions
|
@ -532,8 +532,9 @@ static int handle_file(struct Tracks *tracks, const char *file, int split,
|
||||||
err = AVERROR(ENOMEM);
|
err = AVERROR(ENOMEM);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
temp = av_realloc(tracks->tracks,
|
temp = av_realloc_array(tracks->tracks,
|
||||||
sizeof(*tracks->tracks) * (tracks->nb_tracks + 1));
|
tracks->nb_tracks + 1,
|
||||||
|
sizeof(*tracks->tracks));
|
||||||
if (!temp) {
|
if (!temp) {
|
||||||
av_free(track);
|
av_free(track);
|
||||||
err = AVERROR(ENOMEM);
|
err = AVERROR(ENOMEM);
|
||||||
|
|
Loading…
Add table
Reference in a new issue