From b77688533bef85c01855edc0530cc05065428ad2 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 | 2 ++ .../google/android/exoplayer2/extractor/mp4/AtomParsers.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index c90129e7ba..c7ccb30ad4 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -95,6 +95,8 @@ * Fix issue where playback speeds are not used in adaptive track selections after manual selection changes for other renderers ([#6256](https://github.com/google/ExoPlayer/issues/6256)). +* Fix initialization data handling for FLAC in MP4 + ([#6396](https://github.com/google/ExoPlayer/issues/6396)). ### 2.10.3 ### 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 2800c6069e..46a5c3b734 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 @@ -1162,7 +1162,7 @@ import java.util.List; 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);