Skip to content
Snippets Groups Projects
Commit 1d903a5e authored by Nicolas George's avatar Nicolas George
Browse files

lswr: channel_map requires input conversion.

channel_map is applied between in and postin.
Without this test, if the input format is an acceptable internal format,
the in->postin conversion is skipped. In the best case,
it ignores channel_map, in the worst case it causes an assert failure
if the number of channels is changed by the map.
parent 81dd908c
No related branches found
No related tags found
No related merge requests found
...@@ -542,7 +542,7 @@ static int swr_convert_internal(struct SwrContext *s, AudioData *out, int out_co ...@@ -542,7 +542,7 @@ static int swr_convert_internal(struct SwrContext *s, AudioData *out, int out_co
preout_tmp= s->preout; preout_tmp= s->preout;
preout= &preout_tmp; preout= &preout_tmp;
if(s->int_sample_fmt == s-> in_sample_fmt && s->in.planar) if(s->int_sample_fmt == s-> in_sample_fmt && s->in.planar && !s->channel_map)
postin= in; postin= in;
if(s->resample_first ? !s->resample : !s->rematrix) if(s->resample_first ? !s->resample : !s->rematrix)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment