From ca76a73ca0a25c87bca4ee339150ea4bf414d7aa Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sun, 12 Dec 2010 15:48:47 +0100 Subject: [PATCH] media: update range when active clients changed When we changed the number of active clients, update the current range information because we want the second client connecting to a shared resource continue from where the stream currently. --- gst/rtsp-server/rtsp-media.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst/rtsp-server/rtsp-media.c b/gst/rtsp-server/rtsp-media.c index 9649472..6f03057 100644 --- a/gst/rtsp-server/rtsp-media.c +++ b/gst/rtsp-server/rtsp-media.c @@ -341,7 +341,7 @@ collect_media_stats (GstRTSPMedia * media) GST_INFO ("stats: position %" GST_TIME_FORMAT ", duration %" GST_TIME_FORMAT, GST_TIME_ARGS (position), GST_TIME_ARGS (duration)); - if (position == -1) { + if (position == -1 || media->active > 0) { media->range.min.type = GST_RTSP_TIME_NOW; media->range.min.seconds = -1; } else { @@ -1893,7 +1893,7 @@ gst_rtsp_media_set_state (GstRTSPMedia * media, GstState state, } /* remember where we are */ - if (state == GST_STATE_PAUSED) + if (state == GST_STATE_PAUSED || old_active != media->active) collect_media_stats (media); return TRUE; -- 2.7.4