mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
osxaudiosink: Only fix up channels/layout for PCM caps while probing
It's unlikely that setting a channel layout will do much for AC3/DTS streams. If we find at some point that it does make sense, we can perform the structure copying unconditionally (i.e., the current code is wrong, since AC3/DTS will get two structures now - one with the channel layout, one without). https://bugzilla.gnome.org/show_bug.cgi?id=740987
This commit is contained in:
parent
bd1502862c
commit
df610a7c18
1 changed files with 7 additions and 6 deletions
|
@ -691,13 +691,14 @@ gst_osx_audio_sink_probe_caps (GstOsxAudioSink * osxsink)
|
|||
if (spdif_allowed) {
|
||||
gst_caps_append_structure (caps, gst_structure_copy (in_s));
|
||||
}
|
||||
} else {
|
||||
gst_audio_channel_positions_to_mask (pos, channels, false, &channel_mask);
|
||||
out_s = gst_structure_copy (in_s);
|
||||
gst_structure_remove_fields (out_s, "channels", "channel-mask", NULL);
|
||||
gst_structure_set (out_s, "channels", G_TYPE_INT, channels,
|
||||
"channel-mask", GST_TYPE_BITMASK, channel_mask, NULL);
|
||||
gst_caps_append_structure (caps, out_s);
|
||||
}
|
||||
gst_audio_channel_positions_to_mask (pos, channels, false, &channel_mask);
|
||||
out_s = gst_structure_copy (in_s);
|
||||
gst_structure_remove_fields (out_s, "channels", "channel-mask", NULL);
|
||||
gst_structure_set (out_s, "channels", G_TYPE_INT, channels,
|
||||
"channel-mask", GST_TYPE_BITMASK, channel_mask, NULL);
|
||||
gst_caps_append_structure (caps, out_s);
|
||||
}
|
||||
|
||||
if (osxsink->cached_caps) {
|
||||
|
|
Loading…
Reference in a new issue