aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-24 01:25:46 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-05-10 21:55:41 +0200
commite8411c3b6d92cc2a0e994e83032851221b4b3a3e (patch)
tree4b0a4daf867497dedb221dd6934c6b0734ba640f
parent3d5c38ca7d906521f2b23d8cc80414721dbf5242 (diff)
downloadffmpeg-e8411c3b6d92cc2a0e994e83032851221b4b3a3e.tar.gz
swresample: fix AV_CH_LAYOUT_STEREO_DOWNMIX input
Fixes Ticket 3542 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 291d464161a5bf3b566bc147f83e4242b0c18d74) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libswresample/rematrix.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c
index 541f46a782..392eec838c 100644
--- a/libswresample/rematrix.c
+++ b/libswresample/rematrix.c
@@ -122,6 +122,11 @@ av_cold static int auto_matrix(SwrContext *s)
)
out_ch_layout = AV_CH_LAYOUT_STEREO;
+ if( in_ch_layout == AV_CH_LAYOUT_STEREO_DOWNMIX
+ && (out_ch_layout & AV_CH_LAYOUT_STEREO_DOWNMIX) == 0
+ )
+ in_ch_layout = AV_CH_LAYOUT_STEREO;
+
if(!sane_layout(in_ch_layout)){
av_get_channel_layout_string(buf, sizeof(buf), -1, s->in_ch_layout);
av_log(s, AV_LOG_ERROR, "Input channel layout '%s' is not supported\n", buf);