avfilter/src_movie: check ff_insert_outpad() for failure
authorPaul B Mahol <onemda@gmail.com>
Fri, 25 Aug 2017 08:29:50 +0000 (10:29 +0200)
committerPaul B Mahol <onemda@gmail.com>
Fri, 25 Aug 2017 08:29:50 +0000 (10:29 +0200)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavfilter/src_movie.c

index a0dd66e..258ba50 100644 (file)
@@ -313,7 +313,10 @@ static av_cold int movie_common_init(AVFilterContext *ctx)
             return AVERROR(ENOMEM);
         pad.config_props  = movie_config_output_props;
         pad.request_frame = movie_request_frame;
-        ff_insert_outpad(ctx, i, &pad);
+        if ((ret = ff_insert_outpad(ctx, i, &pad)) < 0) {
+            av_freep(&pad.name);
+            return ret;
+        }
         if ( movie->st[i].st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO &&
             !movie->st[i].st->codecpar->channel_layout) {
             ret = guess_channel_layout(&movie->st[i], i, ctx);