aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-20 16:49:31 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-08-20 18:45:19 +0200
commit6124a7edbcb03e572b9fc03b447361628fcdc52f (patch)
treef7bf4d9a3a30273b84c65e0feeeeee6648bc7f20
parentcb51d9ed254dd3cecc83bc158dea91a973de6d58 (diff)
downloadffmpeg-6124a7edbcb03e572b9fc03b447361628fcdc52f.tar.gz
swr: clean layouts before checking sanity
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 6dfffe92004dfd8c79d18791f28a2b1c7e387845)
-rw-r--r--libswresample/rematrix.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c
index 51658cee21..cfe0a1b592 100644
--- a/libswresample/rematrix.c
+++ b/libswresample/rematrix.c
@@ -118,13 +118,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);