From 05ff1a2c05d3dccf9a07a62bcda15c1715907f85 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 4 Aug 2014 03:05:05 +0200 Subject: [PATCH] swresample/swresample: Treat mono as planar This might in some cases improve performance. Idea from: fbc0b8659967ea54a8472b5f795270d38bb085dd Signed-off-by: Michael Niedermayer --- libswresample/swresample.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libswresample/swresample.c b/libswresample/swresample.c index 91baca62d2..81c04b2a3c 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -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){