mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
opusheader: Do not include rate in caps if it is 0
As expressed in gst_opus_header_create_caps, value 0 means unset. Setting rate value to 0 make negotiation with decoder fail. https://bugzilla.gnome.org/show_bug.cgi?id=748875
This commit is contained in:
parent
97c3e548d6
commit
8dde6b170b
1 changed files with 6 additions and 1 deletions
|
@ -196,7 +196,12 @@ gst_opus_header_create_caps_from_headers (GstCaps ** caps, GSList ** headers,
|
|||
multistream = n_streams > 1;
|
||||
*caps = gst_caps_new_simple ("audio/x-opus",
|
||||
"multistream", G_TYPE_BOOLEAN, multistream,
|
||||
"channels", G_TYPE_INT, channels, "rate", G_TYPE_INT, rate, NULL);
|
||||
"channels", G_TYPE_INT, channels, NULL);
|
||||
|
||||
if (rate > 0) {
|
||||
gst_caps_set_simple (*caps, "rate", G_TYPE_INT, rate, NULL);
|
||||
}
|
||||
|
||||
*caps = _gst_caps_set_buffer_array (*caps, "streamheader", buf1, buf2, NULL);
|
||||
|
||||
if (headers) {
|
||||
|
|
Loading…
Reference in a new issue