[FFmpeg-cvslog] swresample: fix AV_CH_LAYOUT_STEREO_DOWNMIX input

Michael Niedermayer git at videolan.org
Mon Jun 23 18:52:55 CEST 2014


ffmpeg | branch: release/1.2 | Michael Niedermayer <michaelni at gmx.at> | Thu Apr 24 01:25:46 2014 +0200| [c7e9626b7b5958847bb971028a3f4534f3898cae] | committer: Michael Niedermayer

swresample: fix AV_CH_LAYOUT_STEREO_DOWNMIX input

Fixes Ticket 3542

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 291d464161a5bf3b566bc147f83e4242b0c18d74)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c7e9626b7b5958847bb971028a3f4534f3898cae
---

 libswresample/rematrix.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c
index 541f46a..392eec8 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);



More information about the ffmpeg-cvslog mailing list