summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2018-02-08 15:48:49 +1100
committerMatthew Waters <matthew@centricular.com>2018-02-08 15:51:35 +1100
commit6f50d35246d0217df950fd4efadae540ab2592ae (patch)
tree0aa9da5d3ece6d994eb565e143dee91e65f50ef7 /ext
parent7e6b4dcb493435ddc2e9449386340747720b40a8 (diff)
webrtc: Fix ffeb09e4 conditional
Fixes ffeb09e4abe73d3b9e8909996816f0288e307e22 if (sscanf(...)) { // != 0 error; } Is not correct where != 0 indicates some kind of success. Check instead that the correct number of elements were slurped.
Diffstat (limited to 'ext')
-rw-r--r--ext/webrtc/gstwebrtcbin.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/webrtc/gstwebrtcbin.c b/ext/webrtc/gstwebrtcbin.c
index 5c08e10e3..8d2b376fe 100644
--- a/ext/webrtc/gstwebrtcbin.c
+++ b/ext/webrtc/gstwebrtcbin.c
@@ -170,8 +170,7 @@ gst_webrtc_bin_pad_new (const gchar * name, GstPadDirection direction)
#define gst_webrtc_bin_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstWebRTCBin, gst_webrtc_bin, GST_TYPE_BIN,
GST_DEBUG_CATEGORY_INIT (gst_webrtc_bin_debug, "webrtcbin", 0,
- "webrtcbin element");
- );
+ "webrtcbin element"););
static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink_%u",
GST_PAD_SINK,
@@ -2790,7 +2789,8 @@ on_rtpbin_pad_added (GstElement * rtpbin, GstPad * new_pad,
TransportStream *stream;
GstWebRTCBinPad *pad;
- if (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) != 3) {
g_critical ("Invalid rtpbin pad name \'%s\'", new_pad_name);
return;
}