media/libraries
ibaker f91d5208b5 MP3: Use bytes field from VBRI frame instead of deriving from ToC
The previous code assumed that the `VBRI` Table of Contents (ToC)
covers all the MP3 data in the file. In a file with an invalid VBRI ToC
where this isn't the case, this results in playback silently stopping
mid-playback (and either advancing to the next item, or continuing to
count up the playback clock forever). This change considers the `bytes`
field to determine the end of the MP3 data, in addition to deriving it
from the ToC. If they disagree we log a warning and take the max value.
This is because we handle accidentally reading non-MP3 data at the end
(or hitting EoF) better than stopping reading valid MP3 data partway
through.

Issue: androidx/media#1904

#cherrypick

PiperOrigin-RevId: 700319250
(cherry picked from commit 46578ee0a6)
2024-12-18 14:19:41 +00:00
..
cast Remove @DoNotInline annotations 2024-09-18 04:47:39 -07:00
common Add pixel aspect ratio to Format.toLogString 2024-12-17 18:24:31 +00:00
common_ktx Add jvmTarget and kotlin-android plugin to common_ktx module 2024-08-15 10:36:10 -07:00
container Re-define 'max size' of SEI queue to operate on unique timestamps 2024-11-19 11:04:52 +00:00
database Do not trim audio samples by changing their timestamp 2023-06-29 22:50:04 +00:00
datasource DataSourceContractTest: Tighten assertions around 'not found' URIs 2024-11-05 13:09:10 +00:00
datasource_cronet DataSourceContractTest: Tighten assertions around 'not found' URIs 2024-11-05 13:09:10 +00:00
datasource_okhttp DataSourceContractTest: Tighten assertions around 'not found' URIs 2024-11-05 13:09:10 +00:00
datasource_rtmp Remove exoplayer2-only javadoc machinery from media3 2023-06-05 09:47:58 +00:00
decoder MediaCodecVideoRenderer skips decoder inputs unused as reference 2024-07-09 03:43:06 -07:00
decoder_av1 Add missing DefaultRenderersFactoryTest for decoder extensions 2024-11-05 13:10:08 +00:00
decoder_ffmpeg Add 16 KB page support for decoder extensions on Android 15 2024-10-10 10:18:20 -07:00
decoder_flac Re-enable disabled tests in FlacExtractorSeekTest 2024-10-11 04:38:25 -07:00
decoder_iamf Add missing DefaultRenderersFactoryTest for decoder extensions 2024-11-05 13:10:08 +00:00
decoder_midi Add missing DefaultRenderersFactoryTest for decoder extensions 2024-11-05 13:10:08 +00:00
decoder_opus Refactor OpusDecoderTest to use OpusLibrary.isAvailable() 2024-10-31 14:41:24 +00:00
decoder_vp9 Add 16 KB page support for decoder extensions on Android 15 2024-10-10 10:18:20 -07:00
effect Make VideoGraph and VideoFrameProcessor listener methods optional 2024-10-17 02:38:03 -07:00
exoplayer MP3: Use bytes field from VBRI frame instead of deriving from ToC 2024-12-18 14:19:41 +00:00
exoplayer_dash Release the Surface at the end of every playback test 2024-11-05 12:07:17 +00:00
exoplayer_hls Release the Surface at the end of every playback test 2024-11-05 12:07:17 +00:00
exoplayer_ima Account for missing preroll when converting adPodIndex to adGroupIndex 2024-10-04 08:11:04 -07:00
exoplayer_rtsp Merge pull request #1225 from Kekelic:support-for-parsing-rtsp-packets-with-header-extension 2024-11-05 13:10:08 +00:00
exoplayer_smoothstreaming Formatting and javadoc 2024-10-09 13:50:30 +01:00
exoplayer_workmanager Remove exoplayer2-only javadoc machinery from media3 2023-06-05 09:47:58 +00:00
extractor MP3: Use bytes field from VBRI frame instead of deriving from ToC 2024-12-18 14:19:41 +00:00
muxer Manage all color value conversions in ColorInfo class 2024-12-17 18:24:14 +00:00
session Removed unused constructor 2024-11-05 12:13:17 +00:00
test_data MP3: Use bytes field from VBRI frame instead of deriving from ToC 2024-12-18 14:19:41 +00:00
test_exoplayer_playback Revert erroneous changes 2024-07-24 16:17:02 +01:00
test_session_common Add media button preferences 2024-10-17 09:54:36 -07:00
test_session_current Fix supportedCommands in MediaMetadata 2024-11-19 11:04:52 +00:00
test_utils DataSourceContractTest: Tighten assertions around 'not found' URIs 2024-11-05 13:09:10 +00:00
test_utils_robolectric Bump minSdk to 21 and remove resulting simple dead code 2024-07-12 08:11:01 -07:00
transformer Remove deprecated DefaultEncoderFactory constructors. 2024-10-17 01:53:23 -07:00
ui Align spelling of fullScreen to fullscreen 2024-11-05 12:13:16 +00:00
ui_leanback Bump effect and leanback minSdk to 19 2024-01-10 07:22:00 -08:00
lint.xml Update recommended way to suppress @UnstableApi errors in lint.xml 2023-11-15 02:34:40 -08:00