mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 18:51:11 +00:00
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:
parent
0bc8998bdf
commit
f9c5db7d56
1 changed files with 3 additions and 0 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue