diff options
author | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2012-02-22 17:39:16 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2012-02-22 17:39:16 +0000 |
commit | 3e9f191262f6e53c231de751c0d3f26faf689987 (patch) | |
tree | 9d85b19afc400120c017bf728fee6ea0e040b891 /ext/flac/gstflacenc.c | |
parent | f0b076212fd56432e9325758e93b8e726c9423ad (diff) |
flacenc: fix get_caps function some more so that all structures have channel info
Set channels and channel-layout on the right structure; that is, the
structure we are going to append to the caps we are building, and not
the structure we are using as a template for all the structures. Fixes
first structure of the returned caps not having any channel info set
on it.
Diffstat (limited to 'ext/flac/gstflacenc.c')
-rw-r--r-- | ext/flac/gstflacenc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/flac/gstflacenc.c b/ext/flac/gstflacenc.c index 858d09777..f53a24160 100644 --- a/ext/flac/gstflacenc.c +++ b/ext/flac/gstflacenc.c @@ -644,13 +644,13 @@ gst_flac_enc_getcaps (GstAudioEncoder * enc, GstCaps * filter) s2 = gst_structure_copy (s); if (i == 1) { - gst_structure_set (s, "channels", G_TYPE_INT, 1, NULL); + gst_structure_set (s2, "channels", G_TYPE_INT, 1, NULL); } else { guint64 channel_mask; gst_audio_channel_positions_to_mask (channel_positions[i - 1], i, &channel_mask); - gst_structure_set (s, "channels", G_TYPE_INT, i, "channel-mask", + gst_structure_set (s2, "channels", G_TYPE_INT, i, "channel-mask", GST_TYPE_BITMASK, channel_mask, NULL); } |