From 860eb26301ca5aea47f8a34a2394dc304fbf8096 Mon Sep 17 00:00:00 2001 From: Oliver Woodman Date: Fri, 21 Apr 2017 18:04:55 +0100 Subject: [PATCH] Misc cleanup for merged pull requests --- build.gradle | 3 ++- extensions/ffmpeg/README.md | 1 - .../extractor/flv/AudioTagPayloadReader.java | 15 ++++++--------- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/build.gradle b/build.gradle index 5b3c955df4..01b1c28bf6 100644 --- a/build.gradle +++ b/build.gradle @@ -52,8 +52,9 @@ allprojects { releaseWebsite = 'https://github.com/google/ExoPlayer' } if (it.hasProperty('externalBuildDir')) { - if (!new File(externalBuildDir).isAbsolute()) + if (!new File(externalBuildDir).isAbsolute()) { externalBuildDir = new File(rootDir, externalBuildDir) + } buildDir = "${externalBuildDir}/${project.name}" } } diff --git a/extensions/ffmpeg/README.md b/extensions/ffmpeg/README.md index a14e51a894..4ce9173ec9 100644 --- a/extensions/ffmpeg/README.md +++ b/extensions/ffmpeg/README.md @@ -37,7 +37,6 @@ NDK_PATH="" HOST_PLATFORM="linux-x86_64" ``` - * Fetch and build FFmpeg. For example, to fetch and build for armeabi-v7a, arm64-v8a and x86 on Linux x86_64: diff --git a/library/core/src/main/java/com/google/android/exoplayer2/extractor/flv/AudioTagPayloadReader.java b/library/core/src/main/java/com/google/android/exoplayer2/extractor/flv/AudioTagPayloadReader.java index d87802eca6..8e3bd08375 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/extractor/flv/AudioTagPayloadReader.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/extractor/flv/AudioTagPayloadReader.java @@ -15,7 +15,6 @@ */ package com.google.android.exoplayer2.extractor.flv; -import android.util.Log; import android.util.Pair; import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.Format; @@ -38,10 +37,7 @@ import java.util.Collections; private static final int AAC_PACKET_TYPE_SEQUENCE_HEADER = 0; private static final int AAC_PACKET_TYPE_AAC_RAW = 1; - // SAMPLING RATES USED FOR MP3 - private static final int[] AUDIO_SAMPLING_RATE_TABLE = new int[] { - 5512, 11025, 22050, 44100 - }; + private static final int[] AUDIO_SAMPLING_RATE_TABLE = new int[] {5512, 11025, 22050, 44100}; // State variables private boolean hasParsedAudioDataHeader; @@ -100,10 +96,11 @@ import java.util.Collections; // Parse the sequence header. byte[] audioSpecificConfig = new byte[data.bytesLeft()]; data.readBytes(audioSpecificConfig, 0, audioSpecificConfig.length); - Pair audioParams = CodecSpecificDataUtil.parseAacAudioSpecificConfig(audioSpecificConfig); - Format format = - Format.createAudioSampleFormat(null, MimeTypes.AUDIO_AAC, null, Format.NO_VALUE, Format.NO_VALUE, audioParams.second, audioParams.first, - Collections.singletonList(audioSpecificConfig), null, 0, null); + Pair audioParams = CodecSpecificDataUtil.parseAacAudioSpecificConfig( + audioSpecificConfig); + Format format = Format.createAudioSampleFormat(null, MimeTypes.AUDIO_AAC, null, + Format.NO_VALUE, Format.NO_VALUE, audioParams.second, audioParams.first, + Collections.singletonList(audioSpecificConfig), null, 0, null); output.format(format); hasOutputFormat = true; } else if (audioFormat != AUDIO_FORMAT_AAC || packetType == AAC_PACKET_TYPE_AAC_RAW) {