[FFmpeg-devel] [PATCH 1/2] lavfi/af_aresample: fix layout consistency check.
Nicolas George
nicolas.george at normalesup.org
Tue Feb 26 20:17:39 CET 2013
If the channel layout is unknown, lswr will internally use
the default one for the corresponding number of channels.
Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
---
libavfilter/af_aresample.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
This fixes the problem reported by Marton at 2013-02-26 00:41:20 +0100.
Another possible fix would be to stop lswr from using default layouts,
but I do not know lswr enough to know how much work it would entail.
diff --git a/libavfilter/af_aresample.c b/libavfilter/af_aresample.c
index 2e3867e..ab3e7cf 100644
--- a/libavfilter/af_aresample.c
+++ b/libavfilter/af_aresample.c
@@ -160,7 +160,7 @@ static int config_output(AVFilterLink *outlink)
outlink->time_base = (AVRational) {1, out_rate};
av_assert0(outlink->sample_rate == out_rate);
- av_assert0(outlink->channel_layout == out_layout);
+ av_assert0(outlink->channel_layout == out_layout || !outlink->channel_layout);
av_assert0(outlink->format == out_format);
aresample->ratio = (double)outlink->sample_rate / inlink->sample_rate;
--
1.7.10.4
More information about the ffmpeg-devel
mailing list