webrtc: bail on invalid rtpbin names

If we fail parsing rtpbin pad names, someone has screwed up so critical
and return.

CID #1429142
This commit is contained in:
Matthew Waters 2018-02-08 15:25:22 +11:00
parent 3f7e29d5b3
commit ffeb09e4ab

View file

@ -2791,7 +2791,10 @@ on_rtpbin_pad_added (GstElement * rtpbin, GstPad * new_pad,
TransportStream *stream;
GstWebRTCBinPad *pad;
sscanf (new_pad_name, "recv_rtp_src_%u_%u_%u", &session_id, &ssrc, &pt);
if (sscanf (new_pad_name, "recv_rtp_src_%u_%u_%u", &session_id, &ssrc, &pt)) {
g_critical ("Invalid rtpbin pad name \'%s\'", new_pad_name);
return;
}
stream = _find_transport_for_session (webrtc, session_id);
if (!stream)