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>
This commit is contained in:
Michael Niedermayer 2012-05-06 18:04:09 +02:00
parent 72ae583b7d
commit f10aeab69c
1 changed files with 6 additions and 0 deletions

View File

@ -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;