mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-17 22:06:41 +00:00
streamsynchronizer: Also send a GAP event to let audio sinks start their clock in case they did not have enough data yet
This commit is contained in:
parent
6a31051feb
commit
b9d4d0cd29
1 changed files with 9 additions and 2 deletions
|
@ -418,7 +418,9 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstObject * parent,
|
|||
seen_data = stream->seen_data;
|
||||
srcpad = gst_object_ref (stream->srcpad);
|
||||
|
||||
if (stream->segment.rate < 0.0 || stream->segment.stop == -1)
|
||||
if (seen_data && stream->segment.position != -1)
|
||||
timestamp = stream->segment.position;
|
||||
else if (stream->segment.rate < 0.0 || stream->segment.stop == -1)
|
||||
timestamp = stream->segment.start;
|
||||
else
|
||||
timestamp = stream->segment.stop;
|
||||
|
@ -465,7 +467,12 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstObject * parent,
|
|||
gap_event = gst_event_new_gap (timestamp, GST_CLOCK_TIME_NONE);
|
||||
ret = gst_pad_push_event (srcpad, gap_event);
|
||||
} else {
|
||||
ret = TRUE;
|
||||
GstEvent *gap_event;
|
||||
|
||||
/* FIXME: Also send a GAP event to let audio sinks start their
|
||||
* clock in case they did not have enough data yet */
|
||||
gap_event = gst_event_new_gap (timestamp, GST_CLOCK_TIME_NONE);
|
||||
ret = gst_pad_push_event (srcpad, gap_event);
|
||||
}
|
||||
}
|
||||
gst_object_unref (srcpad);
|
||||
|
|
Loading…
Reference in a new issue