mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 10:41:04 +00:00
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.
This commit is contained in:
parent
d99a448f79
commit
ca76a73ca0
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue