swresample/swresample: Treat mono as planar
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 4 Aug 2014 01:05:05 +0000 (03:05 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 4 Aug 2014 01:05:05 +0000 (03:05 +0200)
This might in some cases improve performance.

Idea from: fbc0b8659967ea54a8472b5f795270d38bb085dd
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libswresample/swresample.c

index 91baca6..81c04b2 100644 (file)
@@ -79,6 +79,8 @@ static void set_audiodata_fmt(AudioData *a, enum AVSampleFormat fmt){
     a->fmt   = fmt;
     a->bps   = av_get_bytes_per_sample(fmt);
     a->planar= av_sample_fmt_is_planar(fmt);
+    if (a->ch_count == 1)
+        a->planar = 1;
 }
 
 static void free_temp(AudioData *a){