mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 11:19:55 +00:00
avformat/matroskaenc: use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
3af7e7b501
commit
f6d17d2aa9
@ -1127,7 +1127,7 @@ static int mkv_write_header(AVFormatContext *s)
|
||||
version = 4;
|
||||
}
|
||||
|
||||
mkv->tracks = av_mallocz(s->nb_streams * sizeof(*mkv->tracks));
|
||||
mkv->tracks = av_mallocz_array(s->nb_streams, sizeof(*mkv->tracks));
|
||||
if (!mkv->tracks)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user