[FFmpeg-devel] [PATCH v1 4/6] avformat/dashenc: use av_reallocp_array()

lance.lmwang at gmail.com lance.lmwang at gmail.com
Sun Apr 26 12:49:20 EEST 2020


From: Limin Wang <lance.lmwang at gmail.com>

Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
---
 libavformat/dashenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index 96c0ea3..e3e187c 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -1731,7 +1731,7 @@ static int add_segment(OutputStream *os, const char *file,
     Segment *seg;
     if (os->nb_segments >= os->segments_size) {
         os->segments_size = (os->segments_size + 1) * 2;
-        if ((err = av_reallocp(&os->segments, sizeof(*os->segments) *
+        if ((err = av_reallocp_array(&os->segments, sizeof(*os->segments),
                                os->segments_size)) < 0) {
             os->segments_size = 0;
             os->nb_segments = 0;
-- 
1.8.3.1



More information about the ffmpeg-devel mailing list