diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-08-20 16:49:31 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-08-20 18:42:40 +0200 |
commit | a94404457b0b22e0473c8a4e00d107af92f0e12e (patch) | |
tree | 8b733e696cf976614bd748c16b20103d9076e398 /libswresample/rematrix.c | |
parent | 364495a351b223212b747221e8210d1a5ebd71e6 (diff) | |
download | ffmpeg-a94404457b0b22e0473c8a4e00d107af92f0e12e.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.c | 3 |
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); |