Commit 60655d70 authored by Tanguy Pruvot's avatar Tanguy Pruvot Committed by Jean-Baptiste Kempf
Browse files

jni: fix compilation errors


Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 97bfb5cf
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libvlcjni
LOCAL_SRC_FILES := libvlcjni.c aout.c thumbnailer.c
LOCAL_C_INCLUDES := $(VLC_SRC_DIR)/include
ifeq ($(NO_NEON),)
......@@ -16,7 +19,7 @@ LOCAL_LDLIBS := -L$(VLC_CONTRIB)/lib \
$(VLC_BUILD_DIR)/lib/.libs/libvlc.a \
$(VLC_BUILD_DIR)/src/.libs/libvlccore.a \
-ldl -lz -lm -logg -lvorbisenc -lvorbis -lFLAC -lspeex -ltheora \
-lavformat -lavcodec -lavcore -lswscale -lavutil -lpostproc \
-lavformat -lavcodec -lswscale -lavutil -lpostproc \
-lmpeg2 -lpng -ldca -ldvbpsi -ltwolame -lkate -llog -la52 \
-lebml -lmatroska -ltag \
$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/libs/$(ARCH)/libstdc++.a
......
......@@ -26,7 +26,7 @@ int aout_open(void **opaque, char *format, unsigned *rate, unsigned *nb_channels
if (!p_sys)
{
*opaque = NULL;
return; // OOM
return -1; // OOM
}
// Keep a reference to our Java object and return aout_sys_t
......@@ -41,7 +41,7 @@ int aout_open(void **opaque, char *format, unsigned *rate, unsigned *nb_channels
if ((*myVm)->AttachCurrentThread (myVm, &p_env, NULL) != 0)
{
LOGE("Couldn't attach the display thread to the JVM !");
return;
return -1;
}
p_sys->p_env = p_env;
......@@ -55,7 +55,7 @@ int aout_open(void **opaque, char *format, unsigned *rate, unsigned *nb_channels
(*myVm)->DetachCurrentThread (myVm);
*opaque = NULL;
free (p_sys);
return;
return -1;
}
LOGV ("Fixed number of channels to 2, number of samples to %d", FRAME_SIZE);
......@@ -72,7 +72,7 @@ int aout_open(void **opaque, char *format, unsigned *rate, unsigned *nb_channels
(*p_env)->ExceptionClear (p_env);
*opaque = NULL;
free (p_sys);
return;
return -1;
}
/* Create a new byte array to store the audio data. */
......@@ -86,7 +86,7 @@ int aout_open(void **opaque, char *format, unsigned *rate, unsigned *nb_channels
(*myVm)->DetachCurrentThread (myVm);
*opaque = NULL;
free (p_sys);
return;
return -1;
}
/* Use a global reference to not reallocate memory each time we run
......@@ -98,7 +98,7 @@ int aout_open(void **opaque, char *format, unsigned *rate, unsigned *nb_channels
(*myVm)->DetachCurrentThread (myVm);
*opaque = NULL;
free (p_sys);
return;
return -1;
}
/* The local reference is no longer useful. */
......
......@@ -424,7 +424,7 @@ jlong Java_org_videolan_vlc_android_LibVLC_getLengthFromFile(JNIEnv *env, jobjec
if (m == NULL)
{
LOGE("Couldn't create the media to play!");
return;
return 0;
}
/* Create a media player playing environment */
......
......@@ -32,7 +32,7 @@ jbyteArray Java_org_videolan_vlc_android_LibVLC_getThumbnail(JNIEnv *p_env, jobj
if (p_sys == NULL)
{
LOGE("Couldn't create the thumbnailer data structure!");
return;
return NULL;
}
p_sys->b_hasThumb = 0;
p_sys->i_nbReceivedFrames = 0;
......
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 to comment