mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
webrtc: Add a warning in sdp_media_from_transceiver()
When generating caps with no ssrc, at least throw a warning instead of using an uninitialised stack variable https://bugzilla.gnome.org/show_bug.cgi?id=796810
This commit is contained in:
parent
76a93da2a7
commit
e6a564216d
1 changed files with 7 additions and 3 deletions
|
@ -1704,15 +1704,19 @@ sdp_media_from_transceiver (GstWebRTCBin * webrtc, GstSDPMedia * media,
|
|||
gint clockrate = -1;
|
||||
gint rtx_target_pt;
|
||||
gint original_rtx_target_pt; /* Workaround chrome bug: https://bugs.chromium.org/p/webrtc/issues/detail?id=6196 */
|
||||
guint rtx_target_ssrc;
|
||||
guint rtx_target_ssrc = -1;
|
||||
|
||||
if (gst_structure_get_int (s, "payload", &rtx_target_pt))
|
||||
g_array_append_val (reserved_pts, rtx_target_pt);
|
||||
|
||||
original_rtx_target_pt = rtx_target_pt;
|
||||
|
||||
gst_structure_get_int (s, "clock-rate", &clockrate);
|
||||
gst_structure_get_uint (s, "ssrc", &rtx_target_ssrc);
|
||||
if (!gst_structure_get_int (s, "clock-rate", &clockrate))
|
||||
GST_WARNING_OBJECT (webrtc,
|
||||
"Caps %" GST_PTR_FORMAT " are missing clock-rate", caps);
|
||||
if (!gst_structure_get_uint (s, "ssrc", &rtx_target_ssrc))
|
||||
GST_WARNING_OBJECT (webrtc, "Caps %" GST_PTR_FORMAT " are missing ssrc",
|
||||
caps);
|
||||
|
||||
_pick_fec_payload_types (webrtc, WEBRTC_TRANSCEIVER (trans), reserved_pts,
|
||||
clockrate, &rtx_target_pt, media);
|
||||
|
|
Loading…
Reference in a new issue