mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
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
This commit is contained in:
parent
adb5efaf8a
commit
4735d2a9a5
1 changed files with 2 additions and 4 deletions
|
@ -1108,10 +1108,8 @@ gst_rtspsrc_set_property (GObject * object, guint prop_id, const GValue * value,
|
||||||
const gchar *str;
|
const gchar *str;
|
||||||
|
|
||||||
str = g_value_get_string (value);
|
str = g_value_get_string (value);
|
||||||
if (str) {
|
if (sscanf (str, "%u-%u", &rtspsrc->client_port_range.min,
|
||||||
sscanf (str, "%u-%u",
|
&rtspsrc->client_port_range.max) != 2) {
|
||||||
&rtspsrc->client_port_range.min, &rtspsrc->client_port_range.max);
|
|
||||||
} else {
|
|
||||||
rtspsrc->client_port_range.min = 0;
|
rtspsrc->client_port_range.min = 0;
|
||||||
rtspsrc->client_port_range.max = 0;
|
rtspsrc->client_port_range.max = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue