1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avformat/smoothstreamingenc: use av_reallocp_array()

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
This commit is contained in:
Limin Wang 2020-04-26 17:49:21 +08:00
parent 683e421bcf
commit 1a94456390

View File

@ -464,7 +464,7 @@ static int add_fragment(OutputStream *os, const char *file, const char *infofile
Fragment *frag; Fragment *frag;
if (os->nb_fragments >= os->fragments_size) { if (os->nb_fragments >= os->fragments_size) {
os->fragments_size = (os->fragments_size + 1) * 2; os->fragments_size = (os->fragments_size + 1) * 2;
if ((err = av_reallocp(&os->fragments, sizeof(*os->fragments) * if ((err = av_reallocp_array(&os->fragments, sizeof(*os->fragments),
os->fragments_size)) < 0) { os->fragments_size)) < 0) {
os->fragments_size = 0; os->fragments_size = 0;
os->nb_fragments = 0; os->nb_fragments = 0;