mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
pad-monitor: Check if channel-mask is present only if channels > 2
As it is not a mandatory field otherwize https://bugzilla.gnome.org/show_bug.cgi?id=708499
This commit is contained in:
parent
42857faaae
commit
c469f9b2a4
1 changed files with 6 additions and 2 deletions
|
@ -210,6 +210,7 @@ static void
|
|||
gst_validate_pad_monitor_check_raw_audio_caps_complete (GstValidatePadMonitor *
|
||||
monitor, GstStructure * structure)
|
||||
{
|
||||
gint channels;
|
||||
_check_field_type (monitor, structure, "format", G_TYPE_STRING, GST_TYPE_LIST,
|
||||
0);
|
||||
_check_field_type (monitor, structure, "layout", G_TYPE_STRING, GST_TYPE_LIST,
|
||||
|
@ -218,8 +219,11 @@ gst_validate_pad_monitor_check_raw_audio_caps_complete (GstValidatePadMonitor *
|
|||
GST_TYPE_INT_RANGE, 0);
|
||||
_check_field_type (monitor, structure, "channels", G_TYPE_INT, GST_TYPE_LIST,
|
||||
GST_TYPE_INT_RANGE, 0);
|
||||
_check_field_type (monitor, structure, "channel-mask", GST_TYPE_BITMASK,
|
||||
GST_TYPE_LIST, 0);
|
||||
if (gst_structure_get_int(structure, "channels", &channels)) {
|
||||
if (channels > 2)
|
||||
_check_field_type (monitor, structure, "channel-mask", GST_TYPE_BITMASK,
|
||||
GST_TYPE_LIST, 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue