media/libraries
tonihei 3931c28697 Fix race condition in clipped sample streams
The streams return end-of-input if they read no samples, but know that
they are fully buffered to at least the clipped end time. This helps to
detect the end of stream even if there are no new buffers after the end
of the clip (e.g. for sparse metadata tracks).

The race condition occurs because the buffered position is evaluated
after reading the sample. So between reading "no sample" and checking
the buffered position, the source may have loaded arbitrary amounts
of data. This may lead to a situation where the source has not read
all samples, reads NOTHING_READ (because the queue is empty) and then
immediately returns end-of-stream (because the buffered position
jumped forward), causing all remaining samples in the stream to be
skipped. This can fixed by moving the buffered position check to
before reading the sample, so that it never exceeds the buffered
position at the time of reading "no sample".

#minor-release

PiperOrigin-RevId: 548646464
(cherry picked from commit c64d9fd6da)
2023-07-17 12:17:17 +01:00
..
cast Implement Player.replaceMediaItem(s) 2023-05-26 13:25:10 +00:00
common Expand @UnstableApi javadoc with how to request stable API additions 2023-07-11 11:57:13 +01:00
container Add support for passing custom metadata via transformer 2023-06-12 09:15:53 +00:00
database Fix javadoc links in media README files 2023-03-30 17:26:40 +00:00
datasource Fix missing equals sign in inline-comment parameter names 2023-06-22 16:09:57 +00:00
datasource_cronet Fix missing equals sign in inline-comment parameter names 2023-06-22 16:09:57 +00:00
datasource_okhttp Fix javadoc links in media README files 2023-03-30 17:26:40 +00:00
datasource_rtmp Fix javadoc links in media README files 2023-03-30 17:26:40 +00:00
decoder Update dependencies to latest versions 2023-04-26 15:49:57 +01:00
decoder_av1 Remove Javadoc TODO from README of decoder extensions 2023-04-05 15:48:58 +01:00
decoder_ffmpeg Remove FfmpegVideoRenderer from 1.1.0 release 2023-05-18 18:04:45 +00:00
decoder_flac Update dependencies to latest versions 2023-04-26 15:49:57 +01:00
decoder_opus Update dependencies to latest versions 2023-04-26 15:49:57 +01:00
decoder_vp9 Update dependencies to latest versions 2023-04-26 15:49:57 +01:00
effect Rollback of a66f08ba97 2023-06-12 09:15:55 +00:00
exoplayer Fix race condition in clipped sample streams 2023-07-17 12:17:17 +01:00
exoplayer_dash Replace Dummy with Placeholder 2023-07-13 16:55:49 +01:00
exoplayer_hls Add fields streaming format(sf), stream type(st) and version(v) 2023-07-12 10:25:50 +01:00
exoplayer_ima Fix splitting ad playback state for partial ad group when joining 2023-06-12 09:15:54 +00:00
exoplayer_rtsp Use base Uri from the RTSP DESCRIBE response header for relative paths 2023-05-26 13:25:10 +00:00
exoplayer_smoothstreaming Add tests for DefaultSsChunkSource 2023-07-14 11:03:05 +01:00
exoplayer_workmanager Remove deprecated WorkManagerScheduler constructor 2023-05-18 16:07:51 +00:00
extractor Prepend Ogg ID and Comment Header Pages to offloaded Opus stream 2023-07-14 11:41:56 +01:00
muxer Enable nullness checker for Muxer module androidTest library 2023-06-12 09:15:53 +00:00
session Add custom layout to the state of the MediaController 2023-07-11 20:59:01 +01:00
test_data Prepend Ogg ID and Comment Header Pages to offloaded Opus stream 2023-07-14 11:41:56 +01:00
test_exoplayer_playback Update dependencies to latest versions 2023-04-26 15:49:57 +01:00
test_session_common Add custom layout to the state of the MediaController 2023-07-11 20:59:01 +01:00
test_session_current Add custom layout to the state of the MediaController 2023-07-11 20:59:01 +01:00
test_utils Add nanoTime method to Clock to support overriding System.nanoTime() 2023-07-03 16:29:13 +00:00
test_utils_robolectric Move MdtaMetadataEntry class into container module 2023-05-26 13:25:07 +00:00
transformer Factor out video decoding and fix two minor issues 2023-06-12 11:05:08 +00:00
ui Fix dependencies for UI module 2023-07-14 10:12:32 +01:00
ui_leanback Use Util method for common UI play/pause button logic. 2023-04-26 15:52:50 +01:00