[FFmpeg-cvslog] lavfi/amerge: avoid a forward declaration.

Clément Bœsch git at videolan.org
Tue Sep 11 18:32:29 CEST 2012


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Tue Sep 11 18:36:09 2012 +0200| [bbae8cdf4db52300d3c2f1f9637d3fd10fb3a7b0] | committer: Clément Bœsch

lavfi/amerge: avoid a forward declaration.

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

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

diff --git a/libavfilter/af_amerge.c b/libavfilter/af_amerge.c
index 1ff3c8c..db3539d 100644
--- a/libavfilter/af_amerge.c
+++ b/libavfilter/af_amerge.c
@@ -309,14 +309,14 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
         return AVERROR(ENOMEM);
     for (i = 0; i < am->nb_inputs; i++) {
         char *name = av_asprintf("in%d", i);
-        if (!name)
-            return AVERROR(ENOMEM);
         AVFilterPad pad = {
             .name             = name,
             .type             = AVMEDIA_TYPE_AUDIO,
             .filter_samples   = filter_samples,
             .min_perms        = AV_PERM_READ | AV_PERM_PRESERVE,
         };
+        if (!name)
+            return AVERROR(ENOMEM);
         ff_insert_inpad(ctx, i, &pad);
     }
     return 0;



More information about the ffmpeg-cvslog mailing list