The ID_SEGMENT can only be read once, as seeing the element a second time is
assumed to indicate that the file contains multiple segment elements (which is
not supported).
This change allows the element to be read twice if it is at the same position,
so that retrying loading from the start can succeed.
1. Workaround for decoders that fail to handle the END_OF_STREAM flag.
2. Revert processing of final output buffer if it's non-empty. This
introduced another bug (#596)
Reverts: b88012f51ff3df1d8a35c032c5f585bc994a81ba
Issue: #417
Issue: #596
SubtitleLayout no longer trigger re-layouts of the view hierarchy.
Instead, the SubtitleLayout just invalidates itself. This is made
possible by making SubtitleLayout a regular View that draws each Cue
directly onto the canvas, rather than having SubtitleLayout be a
ViewGroup with a child View for each Cue.
The SubtitleLayout is now properly aligned with the surface.
This means the subtitles remain on top of the video in portrait
mode, rather than being huge and below it.
Prior to this change, there was a bug where playback would
fail with the following steps:
1. Start playback.
2. Pause playback.
3. Disable all renderers.
4. Enable at least one renderer.
5. Resume playback.
The new logic assumes that an input format change will be
followed by an output format change, but I think this is
pretty much guaranteed. If this weren't to happen then the
new pixel aspect ratio wont be picked up, but I think it's
extremely unlikely (it would require the format to stay
exactly the same except for the pixel aspect ratio, which
would be bizarre).
1. An optional U+FEFF BYTE ORDER MARK (BOM) character.
2. The string "WEBVTT".
3. Optionally, either a U+0020 SPACE character or a U+0009 CHARACTER
TABULATION (tab) character followed by any number of characters that
are not U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR) characters.
4. Exactly one WebVTT line terminators to terminate the line with the file
magic and separate it from the rest of the body.
Issue: #580
Improve Mp4Extractor test.
Add support for Xiph lacing in Matroska files.
Add support for EBML lacing in Matroska files.
Handle the initial sticky intent for HDMI audio plug.
An accumulation of several fixes:
1. Change to HlsExtractorWrapper is just a move + documentating
things that were already true + adding a precondition in the
configureSpliceTo method.
2. Change in HlsSampleSource.readData ensures that configureSpliceTo
and hasSamples aren't called on an extractor that isn't prepared.
3. The other change in HlsSampleSource ensures the correct "previous"
TsChunk is used. If a TsChunk fails to load and is replaced, the
previous chunk should be the one before that whose load completed
successfully.
4. Determine switchingVariantSpliced based on the actual format of the
previous chunk, so it's set correctly in the case of a TsChunk load
failure and subsequent replacement.
This fixes the case where we need to switch from one variant to
another during preparation, having loaded zero samples, because
the first chunk for that variant gave us a 404 error. In this
case the first extractor will have no samples, and there will
be a second extractor that does.