range: handle ranges starting with -

An RTSP range that starts with a - means that the first value of the range is
the end of the stream.
This commit is contained in:
Wim Taymans 2012-11-19 13:33:32 +01:00
parent ee7b228be5
commit db7ea32f35

View file

@ -81,7 +81,7 @@ parse_npt_time (const gchar * str, GstRTSPTime * time)
{
if (strncmp (str, "now", 3) == 0) {
time->type = GST_RTSP_TIME_NOW;
} else if (str[0] == '\0') {
} else if (str[0] == '\0' || str[0] == '-') {
time->type = GST_RTSP_TIME_END;
} else if (strstr (str, ":")) {
gint hours, mins;