mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-04 01:32:42 +00:00
webrtcbin: Fix a couple of caps leaks of the offer caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2310>
This commit is contained in:
parent
0f492a39c9
commit
b7951fb897
1 changed files with 3 additions and 0 deletions
|
@ -3718,6 +3718,7 @@ _create_answer_task (GstWebRTCBin * webrtc, const GstStructure * options,
|
||||||
if (rtp_trans)
|
if (rtp_trans)
|
||||||
gst_object_unref (rtp_trans);
|
gst_object_unref (rtp_trans);
|
||||||
gst_caps_unref (answer_caps);
|
gst_caps_unref (answer_caps);
|
||||||
|
gst_caps_unref (offer_caps);
|
||||||
goto rejected;
|
goto rejected;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3732,6 +3733,7 @@ _create_answer_task (GstWebRTCBin * webrtc, const GstStructure * options,
|
||||||
} else {
|
} else {
|
||||||
trans = WEBRTC_TRANSCEIVER (rtp_trans);
|
trans = WEBRTC_TRANSCEIVER (rtp_trans);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_update_transceiver_kind_from_caps (rtp_trans, answer_caps))
|
if (!_update_transceiver_kind_from_caps (rtp_trans, answer_caps))
|
||||||
GST_WARNING_OBJECT (webrtc,
|
GST_WARNING_OBJECT (webrtc,
|
||||||
"Trying to change transceiver %d kind from %d to %d",
|
"Trying to change transceiver %d kind from %d to %d",
|
||||||
|
@ -3774,6 +3776,7 @@ _create_answer_task (GstWebRTCBin * webrtc, const GstStructure * options,
|
||||||
if (answer_dir == GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_NONE) {
|
if (answer_dir == GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_NONE) {
|
||||||
GST_WARNING_OBJECT (webrtc, "Could not intersect offer direction with "
|
GST_WARNING_OBJECT (webrtc, "Could not intersect offer direction with "
|
||||||
"transceiver direction");
|
"transceiver direction");
|
||||||
|
gst_caps_unref (offer_caps);
|
||||||
goto rejected;
|
goto rejected;
|
||||||
}
|
}
|
||||||
_media_replace_direction (media, answer_dir);
|
_media_replace_direction (media, answer_dir);
|
||||||
|
|
Loading…
Reference in a new issue