lavfi/pan: copy ref props after filtering samples.
authorClément Bœsch <ubitux@gmail.com>
Tue, 31 Jan 2012 07:20:42 +0000 (08:20 +0100)
committerClément Bœsch <ubitux@gmail.com>
Thu, 2 Feb 2012 13:31:18 +0000 (14:31 +0100)
At least PTS needs to be copied to avoid breaking options such as -t in
ffmpeg.

libavfilter/af_pan.c

index 1b12de7..354e771 100644 (file)
@@ -360,6 +360,10 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamples)
 
     pan->filter_samples(pan, outsamples, insamples, n);
 
+    avfilter_copy_buffer_ref_props(outsamples, insamples);
+    outsamples->audio->channel_layout = outlink->channel_layout;
+    outsamples->audio->planar         = outlink->planar;
+
     avfilter_filter_samples(outlink, outsamples);
     avfilter_unref_buffer(insamples);
 }