mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
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
1 changed files with 2 additions and 2 deletions
|
@ -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…
Reference in a new issue