[FFmpeg-cvslog] examples/transcoding: use av_malloc_array()

Michael Niedermayer git at videolan.org
Tue Apr 8 15:53:07 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Apr  8 15:35:14 2014 +0200| [9b467d3cd593c18dc0f8dac108da6a8c39ea2bb3] | committer: Michael Niedermayer

examples/transcoding: use av_malloc_array()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 doc/examples/transcoding.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/examples/transcoding.c b/doc/examples/transcoding.c
index 93187fa..5194de3 100644
--- a/doc/examples/transcoding.c
+++ b/doc/examples/transcoding.c
@@ -334,7 +334,7 @@ static int init_filters(void)
     const char *filter_spec;
     unsigned int i;
     int ret;
-    filter_ctx = av_malloc(sizeof(FilteringContext) * ifmt_ctx->nb_streams);
+    filter_ctx = av_malloc_array(ifmt_ctx->nb_streams, sizeof(*filter_ctx));
     if (!filter_ctx)
         return AVERROR(ENOMEM);
 



More information about the ffmpeg-cvslog mailing list