mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 20:05:38 +00:00
audioconvert: never do mixing for 1->1 channel conversions
MONO and NONE position are the same, for example, but in general there isn't much to do here for such a conversion. Fixes problem in audioconvert, which would end up using a mixmatrix when converting between different mono format because it thinks MONO positioning is different from unpositioned channels, which is not the case in this special case. The mixmatrix would end up being 0.0 so audioconvert would convert to silence samples. https://bugzilla.gnome.org/show_bug.cgi?id=724509
This commit is contained in:
parent
5496d09eb4
commit
6c6619a669
1 changed files with 4 additions and 0 deletions
|
@ -654,6 +654,10 @@ gst_channel_mix_passthrough (AudioConvertCtx * this)
|
|||
if (this->in.channels != this->out.channels)
|
||||
return FALSE;
|
||||
|
||||
/* passthrough for 1->1 channels (MONO and NONE position are the same here) */
|
||||
if (this->in.channels == 1 && this->out.channels == 1)
|
||||
return TRUE;
|
||||
|
||||
/* passthrough if both channel masks are the same */
|
||||
in_mask = out_mask = 0;
|
||||
for (i = 0; i < this->in.channels; i++) {
|
||||
|
|
Loading…
Reference in a new issue