[FFmpeg-cvslog] lswr: channel_map requires input conversion.
Nicolas George
git at videolan.org
Tue Jul 17 09:57:46 CEST 2012
ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Mon Jul 16 14:18:19 2012 +0200| [1d903a5ee45d038e2d89b75fd3b6925c6cd187bd] | committer: Nicolas George
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.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1d903a5ee45d038e2d89b75fd3b6925c6cd187bd
---
libswresample/swresample.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index 1b5492d..0c869f9 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)
More information about the ffmpeg-cvslog
mailing list