The 'implementation' dependency causes problems when resolving
ListenableFuture in contexts that also include the
com.google.guava:listenablefuture:1.0 dependency.
Issue: #7905
Issue: #7997
Issue: #7993
PiperOrigin-RevId: 337093024
When I moved ParsableByteArray#data behind a getter I replaced some
assignments with calls to reset(byte[]):
ce2e6e2fd6
reset(byte[]) deliberately sets `limit` to `data.length`, in order to
handle cases that were reassigning `data` but not updating `limit`.
However OggPacket was already using `limit` to track where to write
'new' data into the array, so changing `limit` to `data.length` caused
us to try and write new data beyond the end of the array.
I looked at other uses of reset(byte[]) in ce2e6e2fd6
and condluded the only other usage in MatroskaExtractor is legit and
shouldn't be updated like this (because MatroskaExtractor previously
*wasn't* correctly updating/maintaining `limit`).
Issue: #7992
PiperOrigin-RevId: 334601586
This seems to be an exact copy of sample.adts. Update the test to use
the same sample but just output to a different dump file.
PiperOrigin-RevId: 333469714
This allows to customize extractor flags more easily when setting up the player.
In addition, we need to provide a way to pass in the ExtractorFactory through
the constructor chain starting in SimpleExoPlayer so that removing the
DefaultExtractorsFactory is possible for R8.
PiperOrigin-RevId: 330472935
This allows us to more easily create different dumps derived from the
same assets.
This moves media/source files from `assets/` to `assets/media/` and
dump files from `assets/` to `assets/extractordumps/` and
`assets/audiosinkdumps/` as appropriate. I intend to add
`assets/playbackdumps/` in a future CL.
PiperOrigin-RevId: 326986283
Find sbgp and sgpd boxes with grouping_type == seig in the case they don't
come first. Previoulsy we would only find them if they came first.
Issue: Issue: #7716
PiperOrigin-RevId: 325407819
Having both in the trun box is not allowed (see section section 8.8.8.1
of ISO/IEC 14496-12:2015) but this CL makes the code more robust in case
this happens. Before this change, the first sample flag was not read,
making subsequent reads incorrect.
Issue: #7698
PiperOrigin-RevId: 325212160
The sniffer sniffs boxes at the start of the file to try and determine
whether the file is fragmented. However, if the file is extremely short
then it's possible that sniffing will try and read beyond the end of
the file, resulting i EOFException being thrown.
In general it's OK for sniffing to throw EOFException if the file is
not of the correct type. The problem in this case is that EOFException
can be thrown for an actual MP4 file, due to the sniffer continuing up
sniff atoms up to bytesToSearch in case the file is fragmented.
PiperOrigin-RevId: 325205389
It's potentially confusing that this resets both position & limit, so
require callers to pass `limit` explicitly, or call setPosition(0)
if that's actually what they intended.
This makes enforcing the limit in an upcoming change slightly safer.
PiperOrigin-RevId: 323340485
This allows us to enforce the limit because the array can only be
reassigned through reset(byte[]) or reset(byte[], int) (which update
the limit)
PiperOrigin-RevId: 323339960
MP3 is last in the sniffing order now, so I think it's fine to do this
without worrying about impacting on other file types.
PiperOrigin-RevId: 322996771
This only manifests when turning ParsableByteArray#data into a getData()
method but I'm fixing it beforehand to avoid introducing changes into a
big refactoring change.
#exofixit
PiperOrigin-RevId: 322342497