audioconvert: If no channel-mask can be fixated then use a NONE channel layout
authorSebastian Dröge <sebastian@centricular.com>
Tue, 3 May 2022 10:37:31 +0000 (13:37 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 3 May 2022 10:41:07 +0000 (13:41 +0300)
Otherwise this is generating caps without a channel-mask, which is
invalid for >1 channels and will always fail negotiation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2350>

subprojects/gst-plugins-base/gst/audioconvert/gstaudioconvert.c

index 48f15bf..24bfe9e 100644 (file)
@@ -697,6 +697,8 @@ gst_audio_convert_fixate_channels (GstBaseTransform * base, GstStructure * ins,
   } else if (out_chans > 1) {
     GST_ERROR_OBJECT (base, "Have no default layout for %d channels",
         out_chans);
+    gst_structure_set (outs, "channel-mask", GST_TYPE_BITMASK,
+        G_GUINT64_CONSTANT (0), NULL);
   }
 }