mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2025-02-06 04:07:55 +00:00
avformat/mpegtsenc: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
083b6e739b
commit
337f74868c
@ -628,7 +628,7 @@ static int mpegts_write_header(AVFormatContext *s)
|
|||||||
ts->sdt.write_packet = section_write_packet;
|
ts->sdt.write_packet = section_write_packet;
|
||||||
ts->sdt.opaque = s;
|
ts->sdt.opaque = s;
|
||||||
|
|
||||||
pids = av_malloc(s->nb_streams * sizeof(*pids));
|
pids = av_malloc_array(s->nb_streams, sizeof(*pids));
|
||||||
if (!pids)
|
if (!pids)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user