media/library
ibaker 5f3953d336 Improve AdtsExtractor#sniff when trying different sync word offsets
The previous implementation did the following (after skipping any ID3
headers at the start of the stream):
1. Skip forward byte-by-byte looking for a sync word (0xFFF)
2. Assume this indicates the start of an ADTS frame and read the size
  a) If frameSize <= 6 immediately return false
3. Skip forward by frameSize and expect to find another ADTS sync word
   (with no further scanning).
   b) If we find one, great! Loop from step 2.
   a) If we don't find one then assume the **last** sync word we found
      wasn't actually one, so loop from step 1 starting one extra byte
      into the stream. This means we're looking for a sync word we would
      have skipped over in step 3.

The asymmetry here comes from the different handling of frameSize <= 6
(immediately return false) and frameSize being 'wrong because it doesn't
lead to another sync word' (scan the file again from the beginning for
alternative sync words).

With this change both these cases are handled symmetrically (always scan
for alternative sync words). Step 2a) becomes the same as 3b): Loop back
to the beginning of the stream with an incremented offset and scan for
another sync word.

#minor-release

PiperOrigin-RevId: 397285756
2021-09-17 13:22:13 +01:00
..
all Include RTSP module in gradle project 2021-05-10 23:41:50 +01:00
common Constrain resolved period positions to be within the period 2021-09-16 16:14:20 +01:00
core Fix how preacquired DRM sessions are released under resource contention 2021-09-16 16:41:35 +01:00
dash Select base URL on demand when a new chunk is created 2021-09-16 16:08:05 +01:00
extractor Improve AdtsExtractor#sniff when trying different sync word offsets 2021-09-17 13:22:13 +01:00
hls Fix HLS endless retrying on load errors 2021-09-16 16:44:22 +01:00
rtsp Fix RTSP WWW-Authenticate header parsing. 2021-09-16 17:50:19 +01:00
smoothstreaming Fix poor documentation and variable name choice in StreamKey 2021-09-16 15:06:02 +01:00
transformer Remove ExoPlaybackException factory method that doesn't take errorCode 2021-07-09 09:10:19 +01:00
ui Update PlayerView's UI when available commands change 2021-09-16 14:48:55 +01:00
README.md Tweak and add READMEs + remove refs to V1 2017-08-17 22:59:34 +01: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.