summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--gst/rtsp/gstrtspsrc.c23
-rw-r--r--gst/rtsp/rtspurl.c4
3 files changed, 29 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 412618e0..1e9ddb7a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2007-05-14 Wim Taymans <wim@fluendo.com>
+ * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_parse_range):
+ Parse range correctly.
+
+ * gst/rtsp/rtspurl.c: (rtsp_url_get_request_uri):
+ The baseurl now always has a '/' at the start.
+
+2007-05-14 Wim Taymans <wim@fluendo.com>
+
* gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_configure_caps),
(gst_rtspsrc_parse_range), (gst_rtspsrc_open),
(gst_rtspsrc_parse_rtpinfo), (gst_rtspsrc_play):
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index 69a144a7..e1e2aea6 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -3228,13 +3228,28 @@ gst_rtspsrc_parse_range (GstRTSPSrc * src, const gchar * range)
RTSPTimeRange *therange;
if (rtsp_range_parse (range, &therange) == RTSP_OK) {
+ gint64 seconds;
+
GST_DEBUG_OBJECT (src, "range: '%s', min %f - max %f ",
GST_STR_NULL (range), therange->min.seconds, therange->max.seconds);
- gst_segment_set_duration (&src->segment, GST_FORMAT_TIME,
- therange->max.seconds * GST_SECOND);
- gst_segment_set_last_stop (&src->segment, GST_FORMAT_TIME,
- therange->min.seconds * GST_SECOND);
+ if (therange->min.type == RTSP_TIME_NOW)
+ seconds = 0;
+ else if (therange->min.type == RTSP_TIME_END)
+ seconds = 0;
+ else
+ seconds = therange->min.seconds * GST_SECOND;
+
+ gst_segment_set_last_stop (&src->segment, GST_FORMAT_TIME, seconds);
+
+ if (therange->max.type == RTSP_TIME_NOW)
+ seconds = -1;
+ else if (therange->max.type == RTSP_TIME_END)
+ seconds = -1;
+ else
+ seconds = therange->max.seconds * GST_SECOND;
+
+ gst_segment_set_duration (&src->segment, GST_FORMAT_TIME, seconds);
}
}
diff --git a/gst/rtsp/rtspurl.c b/gst/rtsp/rtspurl.c
index a1955e08..5d8caf1c 100644
--- a/gst/rtsp/rtspurl.c
+++ b/gst/rtsp/rtspurl.c
@@ -200,10 +200,10 @@ rtsp_url_get_request_uri (RTSPUrl * url)
g_return_val_if_fail (url != NULL, NULL);
if (url->port != 0) {
- uri = g_strdup_printf ("rtsp://%s:%u/%s%s%s", url->host, url->port,
+ uri = g_strdup_printf ("rtsp://%s:%u%s%s%s", url->host, url->port,
url->abspath, url->query ? "?" : "", url->query ? url->query : "");
} else {
- uri = g_strdup_printf ("rtsp://%s/%s%s%s", url->host, url->abspath,
+ uri = g_strdup_printf ("rtsp://%s%s%s%s", url->host, url->abspath,
url->query ? "?" : "", url->query ? url->query : "");
}