mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 16:08:51 +00:00
Revert "opusenc: Reverse channel order in template caps"
This reverts commit cdf411e82d
. It causes
pipelines to unnecessarily negotiate to 8 channels.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1688
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3689>
This commit is contained in:
parent
28f7a0ed2e
commit
516fe4ca58
1 changed files with 10 additions and 9 deletions
|
@ -857,8 +857,17 @@ gst_opus_enc_get_sink_template_caps (void)
|
||||||
g_value_unset (&rate_array);
|
g_value_unset (&rate_array);
|
||||||
g_value_unset (&v);
|
g_value_unset (&v);
|
||||||
|
|
||||||
|
/* Mono */
|
||||||
|
s = gst_structure_copy (s1);
|
||||||
|
gst_structure_set (s, "channels", G_TYPE_INT, 1, NULL);
|
||||||
|
gst_caps_append_structure (caps, s);
|
||||||
|
|
||||||
|
s = gst_structure_copy (s2);
|
||||||
|
gst_structure_set (s, "channels", G_TYPE_INT, 1, NULL);
|
||||||
|
gst_caps_append_structure (caps, s);
|
||||||
|
|
||||||
/* Stereo and further */
|
/* Stereo and further */
|
||||||
for (i = 8; i >= 2; i--) {
|
for (i = 2; i <= 8; i++) {
|
||||||
guint64 channel_mask = 0;
|
guint64 channel_mask = 0;
|
||||||
const GstAudioChannelPosition *pos = gst_opus_channel_positions[i - 1];
|
const GstAudioChannelPosition *pos = gst_opus_channel_positions[i - 1];
|
||||||
|
|
||||||
|
@ -889,14 +898,6 @@ gst_opus_enc_get_sink_template_caps (void)
|
||||||
gst_caps_append_structure (caps, s);
|
gst_caps_append_structure (caps, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Mono */
|
|
||||||
s = gst_structure_copy (s1);
|
|
||||||
gst_structure_set (s, "channels", G_TYPE_INT, 1, NULL);
|
|
||||||
gst_caps_append_structure (caps, s);
|
|
||||||
|
|
||||||
s = gst_structure_copy (s2);
|
|
||||||
gst_structure_set (s, "channels", G_TYPE_INT, 1, NULL);
|
|
||||||
gst_caps_append_structure (caps, s);
|
|
||||||
gst_structure_free (s1);
|
gst_structure_free (s1);
|
||||||
gst_structure_free (s2);
|
gst_structure_free (s2);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue