media/libraries
andrewlewis da05a1a66b Fix handling of CBR audio in some AVI files
Before this change, the value of the `dwLength` in the stream header was
interpreted as the number of chunks in the file. Seeking and timestamp
calculation use the media duration and total chunk count. However, in some
files the `dwLength` field appears not to store the number of chunks. For
example, there are CBR MP3 and AC3 files where this field seems to store the
total number of bytes of compressed media instead. That caused seeking and
timestamp calculation to give much smaller values than expected (because the
`dwLength` is very large), which broke seeking.

Work around this using the `idx1` index header if present. We only support
audio formats where every audio sample is a sync sample in AVI, and all chunks
should therefore be listed in this index. Based on testing on many sample AVI
files this gives a reliable total chunk count and fixes seeking.

The test media file is a transcoded version of Big Buck Bunny but manually
edited to overwrite the length, rate and sample size header files to simulate
the error case.

PiperOrigin-RevId: 705103651
2024-12-11 07:43:57 -08:00
..
cast Remove @DoNotInline annotations 2024-09-18 04:47:39 -07:00
common Remove Forwarding from assertForwardingClassOverridesAllMethods 2024-12-09 10:22:06 -08:00
common_ktx Add jvmTarget and kotlin-android plugin to common_ktx module 2024-08-15 10:36:10 -07:00
container Fix some MP4-AT file format related naming 2024-12-09 10:14:34 -08:00
database Enable lint errors in database tests 2024-12-04 03:55:33 -08:00
datasource Enable lint errors in datasource tests 2024-12-03 10:07:19 -08:00
datasource_cronet DataSourceContractTest: Tighten assertions around 'not found' URIs 2024-10-24 03:49:27 -07:00
datasource_okhttp DataSourceContractTest: Tighten assertions around 'not found' URIs 2024-10-24 03:49:27 -07: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-10-30 05:33:38 -07:00
decoder_ffmpeg Add 16 KB page support for decoder extensions on Android 15 2024-10-10 10:18:20 -07:00
decoder_flac Set container MIME type for audio-only extractors 2024-11-14 10:03:17 -08:00
decoder_iamf Enable lint errors in tests for remaining playback modules 2024-12-04 08:08:01 -08:00
decoder_midi Use ForwardingTrackOutput in MidiExtractor 2024-12-03 07:14:58 -08:00
decoder_mpegh Merge Issue: androidx/media#1826: add extension for MPEG-H decoding 2024-10-24 09:53:45 -07:00
decoder_opus Refactor OpusDecoderTest to use OpusLibrary.isAvailable() 2024-10-30 10:02:46 -07:00
decoder_vp9 Add 16 KB page support for decoder extensions on Android 15 2024-10-10 10:18:20 -07:00
effect Move interface locations 2024-12-02 15:03:37 -08:00
exoplayer Fix CompositionPlayerSeekTest timeout 2024-12-11 06:39:49 -08:00
exoplayer_dash Enable sending CmcdData for manifest requests in DASH, HLS and SS 2024-12-10 15:59:39 -08:00
exoplayer_hls Enable sending CmcdData for manifest requests in DASH, HLS and SS 2024-12-10 15:59:39 -08:00
exoplayer_ima Bump IMA dependency to 3.35.1 2024-11-27 04:56:28 -08:00
exoplayer_rtsp Enable lint errors in tests for remaining playback modules 2024-12-04 08:08:01 -08:00
exoplayer_smoothstreaming Enable sending CmcdData for manifest requests in DASH, HLS and SS 2024-12-10 15:59:39 -08:00
exoplayer_workmanager Remove exoplayer2-only javadoc machinery from media3 2023-06-05 09:47:58 +00:00
extractor Fix handling of CBR audio in some AVI files 2024-12-11 07:43:57 -08:00
muxer Fix some MP4-AT file format related naming 2024-12-09 10:14:34 -08:00
session Align logic to ignore disabled and non-custom buttons in custom layout 2024-12-10 06:13:54 -08:00
test_data Fix handling of CBR audio in some AVI files 2024-12-11 07:43:57 -08:00
test_exoplayer_playback Enable lint errors in tests for remaining playback modules 2024-12-04 08:08:01 -08:00
test_session_common Add media button preferences 2024-10-17 09:54:36 -07:00
test_session_current Align logic to ignore disabled and non-custom buttons in custom layout 2024-12-10 06:13:54 -08:00
test_utils VideoFrameProcessorTestRunner add support for portrait video 2024-12-11 04:45:12 -08:00
test_utils_robolectric Add TestPlayerRunHelper run(player).untilFullyBuffered 2024-11-06 02:45:51 -08:00
transformer VideoFrameProcessorTestRunner add support for portrait video 2024-12-11 04:45:12 -08:00
ui Change lib-common dependency scope to api in lib-ui 2024-11-06 08:21:16 -08:00
ui_compose Enable lint errors in tests for remaining playback modules 2024-12-04 08:08:01 -08:00
ui_leanback Bump effect and leanback minSdk to 19 2024-01-10 07:22:00 -08:00
lint.xml Enable lint in lib-common tests 2024-11-04 04:16:39 -08:00