diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-08-04 03:05:05 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-08-04 03:05:05 +0200 |
commit | 05ff1a2c05d3dccf9a07a62bcda15c1715907f85 (patch) | |
tree | 3268756ea01c23a77c7cb8c93e8060b59c226661 /libswresample/swresample.c | |
parent | c62fea75747de132d69cdf8504ab6c8af26fa307 (diff) | |
download | ffmpeg-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>
Diffstat (limited to 'libswresample/swresample.c')
-rw-r--r-- | libswresample/swresample.c | 2 |
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){ |