swr: clean layouts before checking sanity
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6dfffe9200)
This commit is contained in:
committed by
Carl Eugen Hoyos
parent
61dc8494d7
commit
f0f55e6726
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user