am cd492ad1: am 9d34bc31: Fix uninitialized read in gif extension reading
* commit 'cd492ad17514910064aaff1d17741cb5bbb69f0b':
Fix uninitialized read in gif extension reading
diff --git a/variablespeed/jni/jni_entry.cc b/variablespeed/jni/jni_entry.cc
index 368d230..93c12ba 100644
--- a/variablespeed/jni/jni_entry.cc
+++ b/variablespeed/jni/jni_entry.cc
@@ -39,7 +39,7 @@
};
extern "C" {
-JNI_METHOD(playFileDescriptor, void) (JNIEnv*, jclass, int fd, jlong offset,
+JNI_METHOD(playFileDescriptor, void) (JNIEnv*, jclass, jint fd, jlong offset,
jlong length) {
MethodLog _("playFileDescriptor");
AudioEngine::GetEngine()->PlayFileDescriptor(fd, offset, length);
@@ -52,7 +52,7 @@
AudioEngine::GetEngine()->PlayUri(utf8);
}
-JNI_METHOD(setVariableSpeed, void) (JNIEnv*, jclass, float speed) {
+JNI_METHOD(setVariableSpeed, void) (JNIEnv*, jclass, jfloat speed) {
MethodLog _("setVariableSpeed");
AudioEngine::GetEngine()->SetVariableSpeed(speed);
}
@@ -67,19 +67,19 @@
AudioEngine::GetEngine()->RequestStop();
}
-JNI_METHOD(getCurrentPosition, int) (JNIEnv*, jclass) {
+JNI_METHOD(getCurrentPosition, jint) (JNIEnv*, jclass) {
return AudioEngine::GetEngine()->GetCurrentPosition();
}
-JNI_METHOD(getTotalDuration, int) (JNIEnv*, jclass) {
+JNI_METHOD(getTotalDuration, jint) (JNIEnv*, jclass) {
return AudioEngine::GetEngine()->GetTotalDuration();
}
JNI_METHOD(initializeEngine, void) (JNIEnv*, jclass,
- int targetFrames, float windowDuration,
- float windowOverlapDuration, size_t maxPlayBufferCount,
- float initialRate, size_t decodeInitialSize, size_t decodeMaxSize,
- size_t startPositionMillis, int audioStreamType) {
+ jint targetFrames, jfloat windowDuration,
+ jfloat windowOverlapDuration, jint maxPlayBufferCount,
+ jfloat initialRate, jint decodeInitialSize, jint decodeMaxSize,
+ jint startPositionMillis, jint audioStreamType) {
MethodLog _("initializeEngine");
AudioEngine::SetEngine(new AudioEngine(targetFrames,
windowDuration, windowOverlapDuration, maxPlayBufferCount, initialRate,
diff --git a/variablespeed/jni/variablespeed.cc b/variablespeed/jni/variablespeed.cc
index 73ac609..b5d9067 100644
--- a/variablespeed/jni/variablespeed.cc
+++ b/variablespeed/jni/variablespeed.cc
@@ -564,7 +564,7 @@
}
static void CreateAndRealizeAudioPlayer(SLuint32 slSampleRate,
- size_t channelCount, SLuint32 slChannels, SLint32 audioStreamType, SLObjectItf &outputMix,
+ SLuint32 channelCount, SLuint32 slChannels, SLint32 audioStreamType, SLObjectItf &outputMix,
SLObjectItf &audioPlayer, SLEngineItf &engineInterface) {
// Define the source and sink for the audio player: comes from a buffer queue
// and goes to the output mix.
diff --git a/variablespeed/jni/variablespeed.h b/variablespeed/jni/variablespeed.h
index 07cba0f..cf856da 100644
--- a/variablespeed/jni/variablespeed.h
+++ b/variablespeed/jni/variablespeed.h
@@ -86,7 +86,7 @@
bool HasSampleRateAndChannels();
SLuint32 GetSLSampleRate();
SLuint32 GetSLChannels();
- size_t GetChannelCount();
+ SLuint32 GetChannelCount();
// The single global audio engine instance.
static AudioEngine* audioEngine_;