Commit 6a7db4b1 by andrewlewis Committed by Oliver Woodman

Remove unused variable and parameter.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=152107538
parent dd2914f5
...@@ -161,7 +161,7 @@ import java.util.List; ...@@ -161,7 +161,7 @@ import java.util.List;
cryptoInfo.key, cryptoInfo.iv, cryptoInfo.numSubSamples, cryptoInfo.key, cryptoInfo.iv, cryptoInfo.numSubSamples,
cryptoInfo.numBytesOfClearData, cryptoInfo.numBytesOfEncryptedData) cryptoInfo.numBytesOfClearData, cryptoInfo.numBytesOfEncryptedData)
: opusDecode(nativeDecoderContext, inputBuffer.timeUs, inputData, inputData.limit(), : opusDecode(nativeDecoderContext, inputBuffer.timeUs, inputData, inputData.limit(),
outputBuffer, SAMPLE_RATE); outputBuffer);
if (result < 0) { if (result < 0) {
if (result == DRM_ERROR) { if (result == DRM_ERROR) {
String message = "Drm error: " + opusGetErrorMessage(nativeDecoderContext); String message = "Drm error: " + opusGetErrorMessage(nativeDecoderContext);
...@@ -210,7 +210,7 @@ import java.util.List; ...@@ -210,7 +210,7 @@ import java.util.List;
private native long opusInit(int sampleRate, int channelCount, int numStreams, int numCoupled, private native long opusInit(int sampleRate, int channelCount, int numStreams, int numCoupled,
int gain, byte[] streamMap); int gain, byte[] streamMap);
private native int opusDecode(long decoder, long timeUs, ByteBuffer inputBuffer, int inputSize, private native int opusDecode(long decoder, long timeUs, ByteBuffer inputBuffer, int inputSize,
SimpleOutputBuffer outputBuffer, int sampleRate); SimpleOutputBuffer outputBuffer);
private native int opusSecureDecode(long decoder, long timeUs, ByteBuffer inputBuffer, private native int opusSecureDecode(long decoder, long timeUs, ByteBuffer inputBuffer,
int inputSize, SimpleOutputBuffer outputBuffer, int sampleRate, int inputSize, SimpleOutputBuffer outputBuffer, int sampleRate,
ExoMediaCrypto mediaCrypto, int inputMode, byte[] key, byte[] iv, ExoMediaCrypto mediaCrypto, int inputMode, byte[] key, byte[] iv,
......
...@@ -93,16 +93,14 @@ DECODER_FUNC(jlong, opusInit, jint sampleRate, jint channelCount, ...@@ -93,16 +93,14 @@ DECODER_FUNC(jlong, opusInit, jint sampleRate, jint channelCount,
} }
DECODER_FUNC(jint, opusDecode, jlong jDecoder, jlong jTimeUs, DECODER_FUNC(jint, opusDecode, jlong jDecoder, jlong jTimeUs,
jobject jInputBuffer, jint inputSize, jobject jOutputBuffer, jobject jInputBuffer, jint inputSize, jobject jOutputBuffer) {
jint sampleRate) {
OpusMSDecoder* decoder = reinterpret_cast<OpusMSDecoder*>(jDecoder); OpusMSDecoder* decoder = reinterpret_cast<OpusMSDecoder*>(jDecoder);
const uint8_t* inputBuffer = const uint8_t* inputBuffer =
reinterpret_cast<const uint8_t*>( reinterpret_cast<const uint8_t*>(
env->GetDirectBufferAddress(jInputBuffer)); env->GetDirectBufferAddress(jInputBuffer));
const int32_t inputSampleCount = const jint outputSize =
opus_packet_get_nb_samples(inputBuffer, inputSize, sampleRate); kMaxOpusOutputPacketSizeSamples * kBytesPerSample * channelCount;
const jint outputSize = kMaxOpusOutputPacketSizeSamples * kBytesPerSample * channelCount;
env->CallObjectMethod(jOutputBuffer, outputBufferInit, jTimeUs, outputSize); env->CallObjectMethod(jOutputBuffer, outputBufferInit, jTimeUs, outputSize);
const jobject jOutputBufferData = env->CallObjectMethod(jOutputBuffer, const jobject jOutputBufferData = env->CallObjectMethod(jOutputBuffer,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment