aboutsummaryrefslogtreecommitdiffstats
path: root/libswresample/rematrix.c
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:47:25 +0200
commit3f3993ac0aef49b0b27f52d889d5a3d09ad1b0b4 (patch)
tree69ca0c44066b23c081dd9bd02bec4860eb0d4928 /libswresample/rematrix.c
parentb416cb979d5db746f97e802052a34da09af0428f (diff)
downloadffmpeg-3f3993ac0aef49b0b27f52d889d5a3d09ad1b0b4.tar.gz
swr: clean layouts before checking sanity
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 6dfffe92004dfd8c79d18791f28a2b1c7e387845)
Diffstat (limited to 'libswresample/rematrix.c')
-rw-r--r--libswresample/rematrix.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c
index 72da438e6c..c53129b41b 100644
--- a/libswresample/rematrix.c
+++ b/libswresample/rematrix.c
@@ -143,13 +143,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);