summaryrefslogtreecommitdiff
authorMichael Niedermayer <michaelni@gmx.at>2013-08-20 14:49:31 (GMT)
committer Michael Niedermayer <michaelni@gmx.at>2013-08-20 14:49:31 (GMT)
commit6dfffe92004dfd8c79d18791f28a2b1c7e387845 (patch)
tree4d0a223f467ab755bf2e2d1caa9d9b7f0681540d
parent3d64845600c6486a2706b118a81805f3bf4d3db5 (diff)
downloadffmpeg-6dfffe92004dfd8c79d18791f28a2b1c7e387845.zip
ffmpeg-6dfffe92004dfd8c79d18791f28a2b1c7e387845.tar.gz
ffmpeg-6dfffe92004dfd8c79d18791f28a2b1c7e387845.tar.bz2
swr: clean layouts before checking sanity
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat
-rw-r--r--libswresample/rematrix.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c
index f13c240..f15cf71 100644
--- a/libswresample/rematrix.c
+++ b/libswresample/rematrix.c
@@ -123,13 +123,14 @@ av_cold static int auto_matrix(SwrContext *s)
float maxval;
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);