]> git.sesse.net Git - ffmpeg/blobdiff - libswresample/rematrix.c
Merge commit '7ce3bd9614717e545af8fb8455032c807e389b78'
[ffmpeg] / libswresample / rematrix.c
index e146edfcf7d6204fb9ee816ef96038a0b4e39346..bf2abcfb20ede3de70a8ee4ed041a8f9e9a1940c 100644 (file)
@@ -127,6 +127,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);