aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-04 03:05:05 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-04 03:05:05 +0200
commit05ff1a2c05d3dccf9a07a62bcda15c1715907f85 (patch)
tree3268756ea01c23a77c7cb8c93e8060b59c226661
parentc62fea75747de132d69cdf8504ab6c8af26fa307 (diff)
downloadffmpeg-05ff1a2c05d3dccf9a07a62bcda15c1715907f85.tar.gz
swresample/swresample: Treat mono as planar
This might in some cases improve performance. Idea from: fbc0b8659967ea54a8472b5f795270d38bb085dd Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libswresample/swresample.c2
1 files changed, 2 insertions, 0 deletions
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){