Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-06 20:04:09 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-05-06 20:04:09 +0400
commitf10aeab69ca094f2059bad992a8b68bc767a46c9 (patch)
tree05719333d748dfb0c786831b98cc29a4d70799b8 /libswresample/audioconvert.c
parent72ae583b7daa5d471175feddf925d2b5bb5cd546 (diff)
swr: audioconvert: consider mono to be planar
This way it will be handled by the planar==planar SIMD Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/audioconvert.c')
-rw-r--r--libswresample/audioconvert.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libswresample/audioconvert.c b/libswresample/audioconvert.c
index 81bd6d30ba..986c45dee6 100644
--- a/libswresample/audioconvert.c
+++ b/libswresample/audioconvert.c
@@ -124,6 +124,12 @@ AudioConvert *swri_audio_convert_alloc(enum AVSampleFormat out_fmt,
ctx = av_mallocz(sizeof(*ctx));
if (!ctx)
return NULL;
+
+ if(channels == 1){
+ in_fmt = av_get_planar_sample_fmt( in_fmt);
+ out_fmt = av_get_planar_sample_fmt(out_fmt);
+ }
+
ctx->channels = channels;
ctx->conv_f = f;
ctx->ch_map = ch_map;