[FFmpeg-cvslog] swr: clean layouts before checking sanity

Michael Niedermayer git at videolan.org
Tue Aug 20 18:50:57 CEST 2013


ffmpeg | branch: release/2.0 | Michael Niedermayer <michaelni at gmx.at> | Tue Aug 20 16:49:31 2013 +0200| [f0f55e6726184fb526f3e5dc26408b7f383d261d] | committer: Carl Eugen Hoyos

swr: clean layouts before checking sanity

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

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

 libswresample/rematrix.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c
index 48aff3b..af6986a 100644
--- a/libswresample/rematrix.c
+++ b/libswresample/rematrix.c
@@ -122,13 +122,14 @@ av_cold static int auto_matrix(SwrContext *s)
     const int matrix_encoding = s->matrix_encoding;
 
     in_ch_layout = clean_layout(s, s->in_ch_layout);
+    out_ch_layout = clean_layout(s, s->out_ch_layout);
+
     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);
         return AVERROR(EINVAL);
     }
 
-    out_ch_layout = clean_layout(s, s->out_ch_layout);
     if(!sane_layout(out_ch_layout)){
         av_get_channel_layout_string(buf, sizeof(buf), -1, s->out_ch_layout);
         av_log(s, AV_LOG_ERROR, "Output channel layout '%s' is not supported\n", buf);



More information about the ffmpeg-cvslog mailing list