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_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 {
}
/* remember where we are */
- if (state == GST_STATE_PAUSED)
+ if (state == GST_STATE_PAUSED || old_active != media->active)
collect_media_stats (media);
return TRUE;