mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
webrtcbin: Reject caps that are not valid for creating an SDP media.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2705>
This commit is contained in:
parent
d8da5358a6
commit
149c8609c6
1 changed files with 16 additions and 2 deletions
|
@ -3087,7 +3087,15 @@ sdp_media_from_transceiver (GstWebRTCBin * webrtc, GstSDPMedia * media,
|
|||
|
||||
/* this only looks at the first structure so we loop over the given caps
|
||||
* and add each structure inside it piecemeal */
|
||||
gst_sdp_media_set_media_from_caps (format, media);
|
||||
if (gst_sdp_media_set_media_from_caps (format, media) != GST_SDP_OK) {
|
||||
GST_ERROR_OBJECT (webrtc,
|
||||
"Failed to build media from caps %" GST_PTR_FORMAT
|
||||
" for transceiver %" GST_PTR_FORMAT, format, trans);
|
||||
gst_caps_unref (caps);
|
||||
gst_caps_unref (format);
|
||||
gst_structure_free (extmap);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gst_caps_unref (format);
|
||||
}
|
||||
|
@ -4127,7 +4135,13 @@ _create_answer_task (GstWebRTCBin * webrtc, const GstStructure * options,
|
|||
}
|
||||
}
|
||||
|
||||
gst_sdp_media_set_media_from_caps (answer_caps, media);
|
||||
if (gst_sdp_media_set_media_from_caps (answer_caps, media) != GST_SDP_OK) {
|
||||
GST_WARNING_OBJECT (webrtc,
|
||||
"Could not build media from caps %" GST_PTR_FORMAT, answer_caps);
|
||||
gst_clear_caps (&answer_caps);
|
||||
gst_clear_caps (&offer_caps);
|
||||
goto rejected;
|
||||
}
|
||||
|
||||
_get_rtx_target_pt_and_ssrc_from_caps (answer_caps, &target_pt,
|
||||
&target_ssrc);
|
||||
|
|
Loading…
Reference in a new issue