rtsp: detect npt time parse errors

This commit is contained in:
Wim Taymans 2012-11-19 16:04:01 +01:00
parent 81c1172ded
commit 84b1ee4987

View file

@ -86,7 +86,9 @@ parse_npt_time (const gchar * str, GstRTSPTime * time)
} else if (strstr (str, ":")) {
gint hours, mins;
sscanf (str, "%2d:%2d:", &hours, &mins);
if (sscanf (str, "%2d:%2d:", &hours, &mins) != 2)
return GST_RTSP_EINVAL;
str = strchr (str, ':') + 1;
str = strchr (str, ':') + 1;
time->type = GST_RTSP_TIME_SECONDS;