scopy = NULL;
}
if (scopy) {
- gst_caps_append_structure (caps, scopy);
+ gst_caps_merge_structure (caps, scopy);
}
}
if (min_chans == max_chans && max_chans == 1) {
s = get_channel_free_structure (in_structure);
gst_structure_set (s, "channels", G_TYPE_INT, 1, NULL);
- gst_caps_append_structure (caps, s);
+ gst_caps_merge_structure (caps, s);
return;
}
s = get_channel_free_structure (in_structure);
gst_structure_set (s, "channels", G_TYPE_INT, 2, "channel-mask",
GST_TYPE_BITMASK, CHANNEL_MASK_STEREO, NULL);
- gst_caps_append_structure (caps, s);
+ gst_caps_merge_structure (caps, s);
} else if (min_chans == 1 && max_chans >= 2) {
s = get_channel_free_structure (in_structure);
gst_structure_set (s, "channels", G_TYPE_INT, 2, "channel-mask",
GST_TYPE_BITMASK, CHANNEL_MASK_STEREO, NULL);
- gst_caps_append_structure (caps, s);
+ gst_caps_merge_structure (caps, s);
s = get_channel_free_structure (in_structure);
gst_structure_set (s, "channels", G_TYPE_INT, 1, NULL);
- gst_caps_append_structure (caps, s);
+ gst_caps_merge_structure (caps, s);
}
/* don't know whether to use 2.1 or 3.0 here - but I suspect
s = get_channel_free_structure (in_structure);
gst_structure_set (s, "channels", G_TYPE_INT, 3, "channel-mask",
GST_TYPE_BITMASK, CHANNEL_MASK_2_1, NULL);
- gst_caps_append_structure (caps, s);
+ gst_caps_merge_structure (caps, s);
}
/* everything else (4, 6, 8 channels) needs a channel layout */
}
gst_structure_set (s, "channels", G_TYPE_INT, c, "channel-mask",
GST_TYPE_BITMASK, channel_mask, NULL);
- gst_caps_append_structure (caps, s);
+ gst_caps_merge_structure (caps, s);
}
}
s = get_channel_free_structure (in_structure);
gst_structure_set (s, "channels", G_TYPE_INT, c, "channel-mask",
GST_TYPE_BITMASK, G_GUINT64_CONSTANT (0), NULL);
- gst_caps_append_structure (caps, s);
+ gst_caps_merge_structure (caps, s);
}
}