mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
qtdemux: Forward upstream time-format segment without mapping
Sample table based segment event (genereted by qtdemux) could break presentation timeline. For example, qtdemux should not modify upstream time format segment (e.g., adaptivedemux use case) https://bugzilla.gnome.org/show_bug.cgi?id=796480
This commit is contained in:
parent
418a6270e5
commit
6b29a4507e
1 changed files with 25 additions and 12 deletions
|
@ -1038,9 +1038,11 @@ static void
|
|||
gst_qtdemux_push_pending_newsegment (GstQTDemux * qtdemux)
|
||||
{
|
||||
if (G_UNLIKELY (qtdemux->need_segment)) {
|
||||
GstClockTime min_ts;
|
||||
GstEvent *newsegment;
|
||||
|
||||
if (!qtdemux->upstream_format_is_time) {
|
||||
GstClockTime min_ts;
|
||||
|
||||
if (!gst_qtdemux_streams_have_samples (qtdemux)) {
|
||||
/* No samples yet, can't decide on segment.start */
|
||||
GST_DEBUG_OBJECT (qtdemux, "No samples yet, postponing segment event");
|
||||
|
@ -1053,6 +1055,8 @@ gst_qtdemux_push_pending_newsegment (GstQTDemux * qtdemux)
|
|||
g_assert (GST_CLOCK_TIME_IS_VALID (min_ts));
|
||||
|
||||
qtdemux->segment.start = min_ts;
|
||||
}
|
||||
|
||||
newsegment = gst_event_new_segment (&qtdemux->segment);
|
||||
if (qtdemux->segment_seqnum != GST_SEQNUM_INVALID)
|
||||
gst_event_set_seqnum (newsegment, qtdemux->segment_seqnum);
|
||||
|
@ -6900,7 +6904,16 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force)
|
|||
|
||||
demux->got_moov = TRUE;
|
||||
demux->need_segment = TRUE;
|
||||
|
||||
/* Forward upstream driven time format segment, and also do not try
|
||||
* to map edit list with the upstream time format segment.
|
||||
* It's upstream element's role (the origin of time format segment)
|
||||
*/
|
||||
if (demux->upstream_format_is_time)
|
||||
gst_qtdemux_check_send_pending_segment (demux);
|
||||
else
|
||||
gst_qtdemux_map_and_push_segments (demux, &demux->segment);
|
||||
|
||||
if (demux->exposed)
|
||||
demux->need_segment = FALSE;
|
||||
|
||||
|
|
Loading…
Reference in a new issue