audiobasesink: Handle an extra case of buffers being out of segment

It's possible that a buffer might be within the segment proper,
but not within the "valid" part we're playing, which is only
things after the 'offset' part of the segment. In that case,
the running-times of the buffer-start and buffer-stop will be
GST_CLOCK_TIME_NONE, and we'd better not schedule playback that
far in the future.
This commit is contained in:
Jan Schmidt 2018-09-29 00:49:46 +10:00 committed by Sebastian Dröge
parent 0bc8998bdf
commit f9c5db7d56

View file

@ -1989,6 +1989,9 @@ gst_audio_base_sink_render (GstBaseSink * bsink, GstBuffer * buf)
render_stop =
gst_segment_to_running_time (&bsink->segment, GST_FORMAT_TIME, stop);
if (render_start == GST_CLOCK_TIME_NONE || render_stop == GST_CLOCK_TIME_NONE)
goto too_late;
GST_DEBUG_OBJECT (sink,
"running: start %" GST_TIME_FORMAT " - stop %" GST_TIME_FORMAT,
GST_TIME_ARGS (render_start), GST_TIME_ARGS (render_stop));