Skip to content
Snippets Groups Projects
Commit 05ff1a2c authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

swresample/swresample: Treat mono as planar


This might in some cases improve performance.

Idea from: fbc0b865
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent c62fea75
No related branches found
No related tags found
No related merge requests found
...@@ -79,6 +79,8 @@ static void set_audiodata_fmt(AudioData *a, enum AVSampleFormat fmt){ ...@@ -79,6 +79,8 @@ static void set_audiodata_fmt(AudioData *a, enum AVSampleFormat fmt){
a->fmt = fmt; a->fmt = fmt;
a->bps = av_get_bytes_per_sample(fmt); a->bps = av_get_bytes_per_sample(fmt);
a->planar= av_sample_fmt_is_planar(fmt); a->planar= av_sample_fmt_is_planar(fmt);
if (a->ch_count == 1)
a->planar = 1;
} }
static void free_temp(AudioData *a){ static void free_temp(AudioData *a){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment