[FFmpeg-cvslog] swresample: Try to handle cases with input channel count and layout mismatching.
Michael Niedermayer
git at videolan.org
Thu Oct 6 20:29:32 CEST 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Oct 6 19:17:38 2011 +0200| [67b2df792fed29b806cc94213dbd6558d8e717df] | committer: Michael Niedermayer
swresample: Try to handle cases with input channel count and layout mismatching.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=67b2df792fed29b806cc94213dbd6558d8e717df
---
libswresample/swresample.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index 65591f3..c7b206e 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -177,6 +177,11 @@ int swr_init(SwrContext *s){
return -1;
}
+ if(s-> in.ch_count && s->in.ch_count != av_get_channel_layout_nb_channels(s-> in_ch_layout)){
+ av_log(s, AV_LOG_WARNING, "Input channel layout has a different number of channels than there actually is, ignoring layout\n");
+ s-> in_ch_layout= 0;
+ }
+
if(!s-> in_ch_layout)
s-> in_ch_layout= guess_layout(s->in.ch_count);
if(!s->out_ch_layout)
More information about the ffmpeg-cvslog
mailing list