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
@ -210,6 +210,7 @@ static void
|
|||||||
gst_validate_pad_monitor_check_raw_audio_caps_complete (GstValidatePadMonitor *
|
gst_validate_pad_monitor_check_raw_audio_caps_complete (GstValidatePadMonitor *
|
||||||
monitor, GstStructure * structure)
|
monitor, GstStructure * structure)
|
||||||
{
|
{
|
||||||
|
gint channels;
|
||||||
_check_field_type (monitor, structure, "format", G_TYPE_STRING, GST_TYPE_LIST,
|
_check_field_type (monitor, structure, "format", G_TYPE_STRING, GST_TYPE_LIST,
|
||||||
0);
|
0);
|
||||||
_check_field_type (monitor, structure, "layout", G_TYPE_STRING, GST_TYPE_LIST,
|
_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);
|
GST_TYPE_INT_RANGE, 0);
|
||||||
_check_field_type (monitor, structure, "channels", G_TYPE_INT, GST_TYPE_LIST,
|
_check_field_type (monitor, structure, "channels", G_TYPE_INT, GST_TYPE_LIST,
|
||||||
GST_TYPE_INT_RANGE, 0);
|
GST_TYPE_INT_RANGE, 0);
|
||||||
|
if (gst_structure_get_int(structure, "channels", &channels)) {
|
||||||
|
if (channels > 2)
|
||||||
_check_field_type (monitor, structure, "channel-mask", GST_TYPE_BITMASK,
|
_check_field_type (monitor, structure, "channel-mask", GST_TYPE_BITMASK,
|
||||||
GST_TYPE_LIST, 0);
|
GST_TYPE_LIST, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user