[FFmpeg-cvslog] avfilter/formats: use av_realloc_array in ADD_FORMAT()

Clément Bœsch git at videolan.org
Mon Mar 16 23:43:22 CET 2015


ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Sat Mar 14 21:17:27 2015 +0100| [93d9ce7cec48a4c6478bba4383613fca3f28740a] | committer: Clément Bœsch

avfilter/formats: use av_realloc_array in ADD_FORMAT()

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=93d9ce7cec48a4c6478bba4383613fca3f28740a
---

 libavfilter/formats.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/formats.c b/libavfilter/formats.c
index 1fc7fa6..896ceeb 100644
--- a/libavfilter/formats.c
+++ b/libavfilter/formats.c
@@ -308,8 +308,8 @@ do {                                                        \
     if (!(*f) && !(*f = av_mallocz(sizeof(**f))))           \
         return AVERROR(ENOMEM);                             \
                                                             \
-    fmts = av_realloc((*f)->list,                           \
-                      sizeof(*(*f)->list) * ((*f)->nb + 1));\
+    fmts = av_realloc_array((*f)->list, (*f)->nb + 1,       \
+                            sizeof(*(*f)->list));           \
     if (!fmts) {                                            \
         if (!oldf)                                          \
             av_freep(f);                                    \



More information about the ffmpeg-cvslog mailing list