]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/avf_concat: Make independent of the channel layout
authorMichael Niedermayer <michael@niedermayer.cc>
Mon, 5 Sep 2016 23:13:52 +0000 (01:13 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 10 Sep 2016 21:19:01 +0000 (23:19 +0200)
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavfilter/avf_concat.c

index 4fa944766e721a3abfe3b302bf0c0dc242efe1f7..56e41792a78800f6cca063c91d5924e4b8135ab9 100644 (file)
@@ -260,7 +260,6 @@ static int send_silence(AVFilterContext *ctx, unsigned in_no, unsigned out_no,
     int frame_nb_samples, ret;
     AVRational rate_tb = { 1, ctx->inputs[in_no]->sample_rate };
     AVFrame *buf;
-    int nb_channels = av_get_channel_layout_nb_channels(outlink->channel_layout);
 
     if (!rate_tb.den)
         return AVERROR_BUG;
@@ -273,7 +272,7 @@ static int send_silence(AVFilterContext *ctx, unsigned in_no, unsigned out_no,
         if (!buf)
             return AVERROR(ENOMEM);
         av_samples_set_silence(buf->extended_data, 0, frame_nb_samples,
-                               nb_channels, outlink->format);
+                               outlink->channels, outlink->format);
         buf->pts = base_pts + av_rescale_q(sent, rate_tb, outlink->time_base);
         ret = ff_filter_frame(outlink, buf);
         if (ret < 0)