rtpopuspay: Leave original caps as-is

This should make it work if someone specifies stereo with MULTIOPUS
somehow.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3674>
This commit is contained in:
Olivier Crête 2023-01-03 18:55:24 -05:00 committed by Olivier Crête
parent c52c66b575
commit f1cf457811

View file

@ -437,13 +437,11 @@ gst_rtp_opus_pay_getcaps (GstRTPBasePayload * payload,
GstCaps *caps2 = gst_caps_copy (caps);
gst_caps_set_simple (caps, "channels", G_TYPE_INT, 2, NULL);
gst_caps_set_simple (caps2, "channels", G_TYPE_INT, 1, NULL);
caps = gst_caps_merge (caps, caps2);
} else if (!strcmp (stereo, "0")) {
GstCaps *caps2 = gst_caps_copy (caps);
gst_caps_set_simple (caps, "channels", G_TYPE_INT, 1, NULL);
gst_caps_set_simple (caps2, "channels", G_TYPE_INT, 2, NULL);
caps = gst_caps_merge (caps, caps2);
}
}