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
21ff3ae0b0
commit
de827c792d
@ -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…
x
Reference in New Issue
Block a user