mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
audiotestsrc: Produce a default channel mask if possible
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/957 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1560>
This commit is contained in:
parent
fe870b706d
commit
64ac6a1d16
1 changed files with 4 additions and 2 deletions
|
@ -382,9 +382,11 @@ gst_audio_test_src_fixate (GstBaseSrc * bsrc, GstCaps * caps)
|
||||||
|
|
||||||
if (gst_structure_get_int (structure, "channels", &channels) && channels > 2) {
|
if (gst_structure_get_int (structure, "channels", &channels) && channels > 2) {
|
||||||
if (!gst_structure_has_field_typed (structure, "channel-mask",
|
if (!gst_structure_has_field_typed (structure, "channel-mask",
|
||||||
GST_TYPE_BITMASK))
|
GST_TYPE_BITMASK)) {
|
||||||
gst_structure_set (structure, "channel-mask", GST_TYPE_BITMASK, 0ULL,
|
guint64 mask = gst_audio_channel_get_fallback_mask (channels);
|
||||||
|
gst_structure_set (structure, "channel-mask", GST_TYPE_BITMASK, mask,
|
||||||
NULL);
|
NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
caps = GST_BASE_SRC_CLASS (parent_class)->fixate (bsrc, caps);
|
caps = GST_BASE_SRC_CLASS (parent_class)->fixate (bsrc, caps);
|
||||||
|
|
Loading…
Reference in a new issue