mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
splitmuxsrc: properly set total duration on outgoing segment
We would accidentally pass through the duration value from the demuxer from a single fragment, which causes problems when feeding the stream from splitmuxsrc to rtsp-server. Streaming would stop after one fragment due to that. https://bugzilla.gnome.org/show_bug.cgi?id=792861
This commit is contained in:
parent
07ae64118d
commit
ddd4fe680f
1 changed files with 10 additions and 0 deletions
|
@ -428,6 +428,7 @@ gst_splitmux_handle_event (GstSplitMuxSrc * splitmux,
|
|||
break;
|
||||
}
|
||||
case GST_EVENT_SEGMENT:{
|
||||
GstClockTime duration;
|
||||
GstSegment seg;
|
||||
|
||||
gst_event_copy_segment (event, &seg);
|
||||
|
@ -462,6 +463,15 @@ gst_splitmux_handle_event (GstSplitMuxSrc * splitmux,
|
|||
}
|
||||
}
|
||||
|
||||
GST_OBJECT_LOCK (splitmux);
|
||||
duration = splitmux->total_duration;
|
||||
GST_OBJECT_UNLOCK (splitmux);
|
||||
|
||||
if (duration > 0)
|
||||
seg.duration = duration;
|
||||
else
|
||||
seg.duration = GST_CLOCK_TIME_NONE;
|
||||
|
||||
GST_INFO_OBJECT (splitpad,
|
||||
"Forwarding segment %" GST_SEGMENT_FORMAT, &seg);
|
||||
|
||||
|
|
Loading…
Reference in a new issue