mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-19 17:03:55 +00:00
matroskademux: tweak final closing segment sending
... to avoid it interfering with (sparse) stream syncing.
This commit is contained in:
parent
4a5364d7f6
commit
fd88096577
1 changed files with 8 additions and 4 deletions
|
@ -4432,13 +4432,17 @@ pause:
|
||||||
/* Close the segment, i.e. update segment stop with the duration
|
/* Close the segment, i.e. update segment stop with the duration
|
||||||
* if no stop was set */
|
* if no stop was set */
|
||||||
if (GST_CLOCK_TIME_IS_VALID (demux->last_stop_end) &&
|
if (GST_CLOCK_TIME_IS_VALID (demux->last_stop_end) &&
|
||||||
!GST_CLOCK_TIME_IS_VALID (demux->common.segment.stop)) {
|
!GST_CLOCK_TIME_IS_VALID (demux->common.segment.stop) &&
|
||||||
|
GST_CLOCK_TIME_IS_VALID (demux->common.segment.start) &&
|
||||||
|
demux->last_stop_end > demux->common.segment.start) {
|
||||||
|
/* arrange to accumulate duration downstream, but avoid sending
|
||||||
|
* newsegment with decreasing start (w.r.t. sync newsegment events) */
|
||||||
GstEvent *event =
|
GstEvent *event =
|
||||||
gst_event_new_new_segment_full (TRUE, demux->common.segment.rate,
|
gst_event_new_new_segment_full (TRUE, demux->common.segment.rate,
|
||||||
demux->common.segment.applied_rate, demux->common.segment.format,
|
demux->common.segment.applied_rate, demux->common.segment.format,
|
||||||
demux->common.segment.start,
|
demux->last_stop_end, demux->last_stop_end,
|
||||||
MAX (demux->last_stop_end, demux->common.segment.start),
|
demux->common.segment.time + (demux->last_stop_end -
|
||||||
demux->common.segment.time);
|
demux->common.segment.start));
|
||||||
gst_matroska_demux_send_event (demux, event);
|
gst_matroska_demux_send_event (demux, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue