Commit 1813701e authored by Sebastian Dröge's avatar Sebastian Dröge

audiobasesink: Add explanation to the GAP event handling code

parent 7b12afa4
......@@ -1024,6 +1024,10 @@ gst_audio_base_sink_wait_event (GstBaseSink * bsink, GstEvent * event)
spec = &sink->ringbuffer->spec;
gst_event_parse_gap (event, &timestamp, &duration);
/* If the GAP event has a duration, handle it like a
* silence buffer of that duration. Otherwise at least
* start the ringbuffer to make sure the clock is running.
*/
if (duration != GST_CLOCK_TIME_NONE) {
n_samples =
gst_util_uint64_scale_ceil (duration, spec->info.rate, GST_SECOND);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment