mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-03 13:02:29 +00:00
audio: map channels=1,channel-mask=0 to MONO instead of NONE
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
465dfe4920
commit
5496d09eb4
1 changed files with 1 additions and 1 deletions
|
@ -219,7 +219,7 @@ gst_audio_info_from_caps (GstAudioInfo * info, const GstCaps * caps)
|
|||
goto no_channels;
|
||||
|
||||
if (!gst_structure_get (str, "channel-mask", GST_TYPE_BITMASK, &channel_mask,
|
||||
NULL)) {
|
||||
NULL) || (channel_mask == 0 && channels == 1)) {
|
||||
if (channels == 1) {
|
||||
position[0] = GST_AUDIO_CHANNEL_POSITION_MONO;
|
||||
} else if (channels == 2) {
|
||||
|
|
Loading…
Reference in a new issue