From 5a516baa7860597ffe5df28f61af05e7bdd817aa Mon Sep 17 00:00:00 2001 From: andrewlewis Date: Fri, 6 Sep 2019 07:54:35 +0100 Subject: [PATCH] Fix init data handling for FLAC in MP4 Issue: #6396 PiperOrigin-RevId: 267536336 --- RELEASENOTES.md | 10 ++++++---- .../android/exoplayer2/extractor/mp4/AtomParsers.java | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index d3cbc6b2d75..602c823c891 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -11,12 +11,14 @@ quality video can be loaded up to the full default buffer duration. * Bypass sniffing in `ProgressiveMediaPeriod` in case a single extractor is provided ([#6325](https://github.com/google/ExoPlayer/issues/6325)). -* Fix `PlayerNotificationManager` to show play icon rather than pause icon when - playback is ended ([#6324](https://github.com/google/ExoPlayer/issues/6324)). -* Fix audio selection issue where languages are compared by bit rate - ([#6335](https://github.com/google/ExoPlayer/issues/6335)). * Add `HttpDataSource.getResponseCode` to provide the status code associated with the most recent HTTP response. +* Fix initialization data handling for FLAC in MP4 + ([#6396](https://github.com/google/ExoPlayer/issues/6396)). +* Fix audio selection issue where languages are compared by bit rate + ([#6335](https://github.com/google/ExoPlayer/issues/6335)). +* Fix `PlayerNotificationManager` to show play icon rather than pause icon when + playback is ended ([#6324](https://github.com/google/ExoPlayer/issues/6324)). * Upgrade LibRtmp-Client-for-Android to fix RTMP playback issues ([#4200](https://github.com/google/ExoPlayer/issues/4200), [#4249](https://github.com/google/ExoPlayer/issues/4249), diff --git a/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java b/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java index 70873825e3f..0ffbdf0f803 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java @@ -1148,7 +1148,7 @@ private static void parseAudioSampleEntry(ParsableByteArray parent, int atomType System.arraycopy(opusMagic, 0, initializationData, 0, opusMagic.length); parent.setPosition(childPosition + Atom.HEADER_SIZE); parent.readBytes(initializationData, opusMagic.length, childAtomBodySize); - } else if (childAtomSize == Atom.TYPE_dfLa || childAtomType == Atom.TYPE_alac) { + } else if (childAtomType == Atom.TYPE_dfLa || childAtomType == Atom.TYPE_alac) { int childAtomBodySize = childAtomSize - Atom.FULL_HEADER_SIZE; initializationData = new byte[childAtomBodySize]; parent.setPosition(childPosition + Atom.FULL_HEADER_SIZE);