mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
webrtcbin: Simplify answer_caps intersection code a little
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2104>
This commit is contained in:
parent
474c4bf08f
commit
d67dcb2227
1 changed files with 10 additions and 16 deletions
|
@ -3540,27 +3540,21 @@ _create_answer_task (GstWebRTCBin * webrtc, const GstStructure * options,
|
||||||
* that we cannot actually support */
|
* that we cannot actually support */
|
||||||
if (trans_caps) {
|
if (trans_caps) {
|
||||||
answer_caps = gst_caps_intersect (offer_caps, trans_caps);
|
answer_caps = gst_caps_intersect (offer_caps, trans_caps);
|
||||||
if (answer_caps && !gst_caps_is_empty (answer_caps)) {
|
gst_caps_unref (trans_caps);
|
||||||
|
if (answer_caps) {
|
||||||
|
if (!gst_caps_is_empty (answer_caps)) {
|
||||||
GST_LOG_OBJECT (webrtc,
|
GST_LOG_OBJECT (webrtc,
|
||||||
"found compatible transceiver %" GST_PTR_FORMAT
|
"found compatible transceiver %" GST_PTR_FORMAT
|
||||||
" for offer media %u", rtp_trans, i);
|
" for offer media %u", rtp_trans, i);
|
||||||
if (trans_caps)
|
|
||||||
gst_caps_unref (trans_caps);
|
|
||||||
break;
|
break;
|
||||||
} else {
|
}
|
||||||
if (answer_caps) {
|
|
||||||
gst_caps_unref (answer_caps);
|
gst_caps_unref (answer_caps);
|
||||||
answer_caps = NULL;
|
answer_caps = NULL;
|
||||||
}
|
}
|
||||||
if (trans_caps)
|
|
||||||
gst_caps_unref (trans_caps);
|
|
||||||
rtp_trans = NULL;
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
rtp_trans = NULL;
|
rtp_trans = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (rtp_trans) {
|
if (rtp_trans) {
|
||||||
answer_dir = rtp_trans->direction;
|
answer_dir = rtp_trans->direction;
|
||||||
|
|
Loading…
Reference in a new issue