Commit 291d4641 authored by Michael Niedermayer's avatar Michael Niedermayer

swresample: fix AV_CH_LAYOUT_STEREO_DOWNMIX input

Fixes Ticket 3542
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 417ae628
...@@ -127,6 +127,11 @@ av_cold static int auto_matrix(SwrContext *s) ...@@ -127,6 +127,11 @@ av_cold static int auto_matrix(SwrContext *s)
) )
out_ch_layout = AV_CH_LAYOUT_STEREO; 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)){ if(!sane_layout(in_ch_layout)){
av_get_channel_layout_string(buf, sizeof(buf), -1, s->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); av_log(s, AV_LOG_ERROR, "Input channel layout '%s' is not supported\n", buf);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment