lavfi/trim: fix sample copy for >8 channels
authorPaul B Mahol <onemda@gmail.com>
Sat, 13 Jul 2013 21:53:34 +0000 (21:53 +0000)
committerPaul B Mahol <onemda@gmail.com>
Sat, 13 Jul 2013 21:54:02 +0000 (21:54 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavfilter/trim.c

index f6e75d3..6fa3c0c 100644 (file)
@@ -333,7 +333,7 @@ static int atrim_filter_frame(AVFilterLink *inlink, AVFrame *frame)
 
         av_frame_copy_props(out, frame);
         av_samples_copy(out->extended_data, frame->extended_data, 0, start_sample,
-                        out->nb_samples, av_get_channel_layout_nb_channels(frame->channel_layout),
+                        out->nb_samples, inlink->channels,
                         frame->format);
         if (out->pts != AV_NOPTS_VALUE)
             out->pts += av_rescale_q(start_sample, (AVRational){ 1, out->sample_rate },