tonihei 3c6b8c5d7b Handle AV sync timestamps when draining the audio sink during tunneling
When audio processors are enabled during tunneling, they must produce
output immediately, ensuring that the timestamps of the output samples
correspond to the input and that no additional samples are produced.
This requirement is documented in the Javadoc of DefaultAudioSink.

However, this alone doesn't guarantee all buffers are immediately
written to the AudioTrack, because the AudioTrack writes are
non-blocking and may need multiple attempts.

When draining the audio sink at the end of the stream, we currently
fail in this situation because we assert that the timestamp must be
set (=the drain operation is a no-op). But this may not be true when
the previous non-blocking write wasn't fully handled. We can fix this
by saving the last timestamp and reusing it during draining.

Issue: google/ExoPlayer#10847
PiperOrigin-RevId: 500943891
2023-01-10 20:51:19 +00:00
..
2022-02-08 11:03:36 +00:00
2022-02-18 15:02:33 +00:00
2023-01-10 20:08:14 +00:00
2022-11-21 14:27:00 +00:00
2022-12-12 13:07:19 +00:00

ExoPlayer library

The ExoPlayer library is split into multiple modules. See ExoPlayer's top level README for more information about the available library modules and how to use them.