We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef713ec commit e412a4eCopy full SHA for e412a4e
android/src/main/java/com/ryanheise/just_waveform/WaveformExtractor.java
@@ -138,7 +138,9 @@ void processAudio() {
138
// XXX: Do we need to set this or is there a default?
139
outFormat.setInteger(MediaFormat.KEY_SAMPLE_RATE, sampleRate);
140
outFormat.setInteger(MediaFormat.KEY_CHANNEL_COUNT, channelCount);
141
- outFormat.setInteger(MediaFormat.KEY_BIT_RATE, inFormat.getInteger(MediaFormat.KEY_BIT_RATE));
+ if (inFormat.containsKey(MediaFormat.KEY_BIT_RATE)) {
142
+ outFormat.setInteger(MediaFormat.KEY_BIT_RATE, inFormat.getInteger(MediaFormat.KEY_BIT_RATE));
143
+ }
144
MediaFormat changedOutFormat = null;
145
while (!sawInputEOS && decoderIdleCount < 100) {
146
decoderIdleCount++;
0 commit comments