mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 06:16:36 +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;
|
seen_data = stream->seen_data;
|
||||||
srcpad = gst_object_ref (stream->srcpad);
|
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;
|
timestamp = stream->segment.start;
|
||||||
else
|
else
|
||||||
timestamp = stream->segment.stop;
|
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);
|
gap_event = gst_event_new_gap (timestamp, GST_CLOCK_TIME_NONE);
|
||||||
ret = gst_pad_push_event (srcpad, gap_event);
|
ret = gst_pad_push_event (srcpad, gap_event);
|
||||||
} else {
|
} 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);
|
gst_object_unref (srcpad);
|
||||||
|
|
Loading…
Reference in a new issue