aboutsummaryrefslogtreecommitdiff
path: root/libswresample
diff options
context:
space:
mode:
authorNicolas George2012-07-16 14:18:19 +0200
committerNicolas George2012-07-17 09:50:36 +0200
commit1d903a5ee45d038e2d89b75fd3b6925c6cd187bd (patch)
tree44fabc186ad5cfa926a11c865bbdc6d08c31c7bf /libswresample
parent81dd908c6e2982c419b4690e4c4839cbc16344fa (diff)
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.
Diffstat (limited to 'libswresample')
-rw-r--r--libswresample/swresample.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index 1b5492da92..0c869f9d12 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -542,7 +542,7 @@ static int swr_convert_internal(struct SwrContext *s, AudioData *out, int out_co
preout_tmp= s->preout;
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;
if(s->resample_first ? !s->resample : !s->rematrix)