1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

swr: clean layouts before checking sanity

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-08-20 16:49:31 +02:00
parent 3d64845600
commit 6dfffe9200

View File

@ -123,13 +123,14 @@ av_cold static int auto_matrix(SwrContext *s)
float maxval; float maxval;
in_ch_layout = clean_layout(s, s->in_ch_layout); 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)){ if(!sane_layout(in_ch_layout)){
av_get_channel_layout_string(buf, sizeof(buf), -1, s->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); av_log(s, AV_LOG_ERROR, "Input channel layout '%s' is not supported\n", buf);
return AVERROR(EINVAL); return AVERROR(EINVAL);
} }
out_ch_layout = clean_layout(s, s->out_ch_layout);
if(!sane_layout(out_ch_layout)){ if(!sane_layout(out_ch_layout)){
av_get_channel_layout_string(buf, sizeof(buf), -1, s->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); av_log(s, AV_LOG_ERROR, "Output channel layout '%s' is not supported\n", buf);