Browse Source

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>
tags/n0.11
Michael Niedermayer 13 years ago
parent
commit
f10aeab69c
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      libswresample/audioconvert.c

+ 6
- 0
libswresample/audioconvert.c 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;


Loading…
Cancel
Save