diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-01-26 14:28:06 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-01-26 14:28:06 +0100 |
commit | 61a53092e401a782af4e6e27323bfc5d2217ea23 (patch) | |
tree | 5a309b7ca3e41a63615a3501dc246514b09effa6 | |
parent | 2e65a0f34a5f67949562bb3ea550d0b87c0bd756 (diff) |
alsa: merge instead of appending structures
-rw-r--r-- | ext/alsa/gstalsa.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/alsa/gstalsa.c b/ext/alsa/gstalsa.c index 8da665b89..12db49ab6 100644 --- a/ext/alsa/gstalsa.c +++ b/ext/alsa/gstalsa.c @@ -138,7 +138,7 @@ add_format (const gchar * str, GstStructure * s, snd_pcm_format_mask_t * mask, scopy = NULL; } if (scopy) { - gst_caps_append_structure (caps, scopy); + gst_caps_merge_structure (caps, scopy); } } @@ -221,7 +221,7 @@ caps_add_channel_configuration (GstCaps * caps, 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; } @@ -232,15 +232,15 @@ caps_add_channel_configuration (GstCaps * caps, 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 @@ -250,7 +250,7 @@ caps_add_channel_configuration (GstCaps * caps, 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 */ @@ -275,7 +275,7 @@ caps_add_channel_configuration (GstCaps * caps, } 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); } } @@ -284,7 +284,7 @@ caps_add_channel_configuration (GstCaps * caps, 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); } } |