mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 15:48:23 +00:00
qtdemux: Forward segments directly if we are operating in PUSH mode on fragmented streams
We shouldn't go through segment activation as we will only have a limited understanding of how the whole stream timeline looks like from the moof. We only know about the current fragment, while upstream knows about the whole stream. This fixes seeking in DASH streams, both for seeks after the current moof and for seeks into the current moof. The former would fail because the moof ends and we can't activate any segment, the latter would cause a segment that stops at the moof end, and no further fragments would be played because we end up being EOS. https://bugzilla.gnome.org/show_bug.cgi?id=767071
This commit is contained in:
parent
f9e01a53d8
commit
24862c2f74
1 changed files with 10 additions and 2 deletions
|
@ -2164,8 +2164,16 @@ gst_qtdemux_handle_sink_event (GstPad * sinkpad, GstObject * parent,
|
|||
|
||||
/* map segment to internal qt segments and push on each stream */
|
||||
if (demux->n_streams) {
|
||||
gst_event_replace (&demux->pending_newsegment, NULL);
|
||||
gst_qtdemux_map_and_push_segments (demux, &segment);
|
||||
if (demux->fragmented) {
|
||||
GstEvent *segment_event = gst_event_new_segment (&segment);
|
||||
|
||||
gst_event_replace (&demux->pending_newsegment, NULL);
|
||||
gst_event_set_seqnum (segment_event, demux->segment_seqnum);
|
||||
gst_qtdemux_push_event (demux, segment_event);
|
||||
} else {
|
||||
gst_event_replace (&demux->pending_newsegment, NULL);
|
||||
gst_qtdemux_map_and_push_segments (demux, &segment);
|
||||
}
|
||||
}
|
||||
|
||||
/* clear leftover in current segment, if any */
|
||||
|
|
Loading…
Reference in a new issue