diff options
author | Luis de Bethencourt <luisbg@osg.samsung.com> | 2015-12-14 14:19:05 +0000 |
---|---|---|
committer | Luis de Bethencourt <luisbg@osg.samsung.com> | 2015-12-14 14:53:57 +0000 |
commit | 4735d2a9a587228628b4fec1b1b953c9dbaa7cb9 (patch) | |
tree | f83cee894ba706fd32ffc36581a46d285b4e1c7d /gst/rtsp | |
parent | adb5efaf8a9a5b4b6590c637f9054f5df8f2b2a1 (diff) | |
download | gstreamer-plugins-good-4735d2a9a587228628b4fec1b1b953c9dbaa7cb9.tar.gz |
rtspsrc: check port-range format
The string could exist but with a wrong format, in that case we still want
to reset the values of client_port_range.min and max like we do if there is
no string.
CID 1139593
Diffstat (limited to 'gst/rtsp')
-rw-r--r-- | gst/rtsp/gstrtspsrc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index 76b98e22a..9f806ec83 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -1108,10 +1108,8 @@ gst_rtspsrc_set_property (GObject * object, guint prop_id, const GValue * value, const gchar *str; str = g_value_get_string (value); - if (str) { - sscanf (str, "%u-%u", - &rtspsrc->client_port_range.min, &rtspsrc->client_port_range.max); - } else { + if (sscanf (str, "%u-%u", &rtspsrc->client_port_range.min, + &rtspsrc->client_port_range.max) != 2) { rtspsrc->client_port_range.min = 0; rtspsrc->client_port_range.max = 0; } |