diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-05-06 18:04:09 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-06 18:04:09 +0200 |
commit | f10aeab69ca094f2059bad992a8b68bc767a46c9 (patch) | |
tree | 05719333d748dfb0c786831b98cc29a4d70799b8 /libswresample | |
parent | 72ae583b7daa5d471175feddf925d2b5bb5cd546 (diff) | |
download | ffmpeg-f10aeab69ca094f2059bad992a8b68bc767a46c9.tar.gz |
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')
-rw-r--r-- | libswresample/audioconvert.c | 6 |
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; |