|
10 | 10 | #define LOG_TAG "iLBC_codec"
|
11 | 11 |
|
12 | 12 | #include <android/log.h>
|
13 |
| -#define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, __VA_ARGS__) |
14 |
| -#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG , LOG_TAG, __VA_ARGS__) |
15 |
| -#define LOGI(...) __android_log_print(ANDROID_LOG_INFO , LOG_TAG, __VA_ARGS__) |
16 |
| -#define LOGW(...) __android_log_print(ANDROID_LOG_WARN , LOG_TAG, __VA_ARGS__) |
| 13 | +#define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, __VA_ARGS__) |
| 14 | +#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG , LOG_TAG, __VA_ARGS__) |
| 15 | +#define LOGI(...) __android_log_print(ANDROID_LOG_INFO , LOG_TAG, __VA_ARGS__) |
| 16 | +#define LOGW(...) __android_log_print(ANDROID_LOG_WARN , LOG_TAG, __VA_ARGS__) |
17 | 17 | #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR , LOG_TAG, __VA_ARGS__)
|
18 | 18 |
|
19 | 19 | #define JNI_COPY 0
|
@@ -65,7 +65,9 @@ jint Java_com_tuenti_androidilbc_Codec_encode(JNIEnv *env, jobject this,
|
65 | 65 | jsize src_size, dest_size;
|
66 | 66 | jbyte *src_bytes, *dest_bytes;
|
67 | 67 |
|
68 |
| - int bytes_remaining, bytes_encoded, bytes; |
| 68 | + int bytes_remaining = 0; |
| 69 | + int bytes_encoded = 0; |
| 70 | + int bytes = 0; |
69 | 71 |
|
70 | 72 | encoding = 1;
|
71 | 73 | if(Enc_Inst == NULL){
|
@@ -133,14 +135,16 @@ jint Java_com_tuenti_androidilbc_Codec_resetDecoder(JNIEnv *env, jobject this){
|
133 | 135 | return 1;
|
134 | 136 | }
|
135 | 137 |
|
136 |
| -jint Java_com_tuenti_androidilbc_Codec_decode(JNIEnv *env, jobject this, |
| 138 | +jint Java_com_tuenti_androidilbc_Codec_decode(JNIEnv *env, jobject this, |
137 | 139 | jbyteArray src, jint src_offset, jint src_len, jbyteArray dest)
|
138 | 140 | {
|
139 | 141 | jsize src_size, dest_size;
|
140 | 142 | jbyte *src_bytes, *dest_bytes;
|
141 | 143 |
|
142 |
| - int bytes_remaining, bytes_decoded, num_samples; |
143 |
| - short speechType; |
| 144 | + int bytes_remaining = 0; |
| 145 | + int bytes_decoded = 0; |
| 146 | + int num_samples = 0; |
| 147 | + short speechType = 0; |
144 | 148 |
|
145 | 149 | src_size = (*env)->GetArrayLength(env, src);
|
146 | 150 | src_bytes = (*env)->GetByteArrayElements(env, src, JNI_COPY);
|
|
0 commit comments