提交 605aeb3a 编写于 作者: A aquilescanta 提交者: Oliver Woodman

Make id3 context usage robust against container format changes

Issue:#3622

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182363243
上级 65597e0d
......@@ -2,8 +2,6 @@
### dev-v2 (not yet released) ###
* HLS: Fix mime type propagation
([#3653](https://github.com/google/ExoPlayer/issues/3653)).
* SimpleExoPlayerView: Automatically apply video rotation if
`SimpleExoPlayerView` is configured to use `TextureView`
([#91](https://github.com/google/ExoPlayer/issues/91)).
......@@ -50,6 +48,10 @@
significantly reduce initial buffering time
([#3149](https://github.com/google/ExoPlayer/issues/3149)).
* Fail on loss of sync with Transport Stream.
* Fix mime type propagation
([#3653](https://github.com/google/ExoPlayer/issues/3653)).
* Fix ID3 context reuse across segment format changes
([#3622](https://github.com/google/ExoPlayer/issues/3622)).
* New Cast extension: Simplifies toggling between local and Cast playbacks.
* Audio: Support TrueHD passthrough for rechunked samples in Matroska files
([#2147](https://github.com/google/ExoPlayer/issues/2147)).
......
......@@ -137,9 +137,13 @@ import java.util.concurrent.atomic.AtomicInteger;
reusingExtractor = extractor == previousExtractor;
initLoadCompleted = reusingExtractor && initDataSpec != null;
if (isPackedAudioExtractor) {
id3Decoder = previousChunk != null ? previousChunk.id3Decoder : new Id3Decoder();
id3Data = previousChunk != null ? previousChunk.id3Data
: new ParsableByteArray(Id3Decoder.ID3_HEADER_LENGTH);
if (previousChunk != null && previousChunk.id3Data != null) {
id3Decoder = previousChunk.id3Decoder;
id3Data = previousChunk.id3Data;
} else {
id3Decoder = new Id3Decoder();
id3Data = new ParsableByteArray(Id3Decoder.ID3_HEADER_LENGTH);
}
} else {
id3Decoder = null;
id3Data = null;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册