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.
This commit is contained in:
parent
f0b076212f
commit
3e9f191262
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user