examples/transcoding: use av_malloc_array()
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 8 Apr 2014 13:35:14 +0000 (15:35 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 8 Apr 2014 13:35:14 +0000 (15:35 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
doc/examples/transcoding.c

index 93187fa..5194de3 100644 (file)
@@ -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);