Skip to content
Snippets Groups Projects
Commit 9a463265 authored by Alexandre Janniaux's avatar Alexandre Janniaux Committed by Felix Paul Kühne
Browse files

audio_output: decoder: remove clock reset on drain


After commit 0dd8096f made the drain
asynchronous, the clock at the end of the drain can be reset before the
end of the playback.

When finishing an input while draining asynchronously the audio and
video, it means that the clock can become invalidated and unusable if
the audio terminates before the video.

The video will then switch to the monotonic fallback, which is currently
not synchronized in offset with the master clock, and would lead to a
huge gap in time for the next picture being displayed, deferring as much
the draining of the video output.

The normal processing should be first to drain the decoder, and when
everything has been pushed, to first flush the decoder if a clock reset
is needed.

It was breaking the test_src_player::test_titles by randomly creating a
wait time of more than 90 seconds for the penultimate picture in the
video output, deferring the end of the test by that much. Now the clock
will stay valid with constant parameters until the end of all the
tracks.

Note that it does not fix the problem where the master clock has
finished, but we seek later in the file, which is a different
synchronization issue.

Fixes #27106

Co-authored-by: default avatarThomas Guillem <thomas@gllm.fr>
parent 57ce124f
No related branches found
No related tags found
Loading
Pipeline #241467 passed with stage
in 14 minutes and 8 seconds
......@@ -990,10 +990,4 @@ void vlc_aout_stream_Drain(vlc_aout_stream *stream)
atomic_store_explicit(&stream->drain_deadline, drain_deadline,
memory_order_relaxed);
}
vlc_clock_Reset(stream->sync.clock);
if (stream->filters)
aout_FiltersResetClock(stream->filters);
stream_Discontinuity(stream);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment