Fixes Ticket 3542
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 291d464161a5bf3b566bc147f83e4242b0c18d74)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -122,6 +122,11 @@ av_cold static int auto_matrix(SwrContext *s) |
122 | 122 |
) |
123 | 123 |
out_ch_layout = AV_CH_LAYOUT_STEREO; |
124 | 124 |
|
125 |
+ if( in_ch_layout == AV_CH_LAYOUT_STEREO_DOWNMIX |
|
126 |
+ && (out_ch_layout & AV_CH_LAYOUT_STEREO_DOWNMIX) == 0 |
|
127 |
+ ) |
|
128 |
+ in_ch_layout = AV_CH_LAYOUT_STEREO; |
|
129 |
+ |
|
125 | 130 |
if(!sane_layout(in_ch_layout)){ |
126 | 131 |
av_get_channel_layout_string(buf, sizeof(buf), -1, s->in_ch_layout); |
127 | 132 |
av_log(s, AV_LOG_ERROR, "Input channel layout '%s' is not supported\n", buf); |