From acfb1c44a7b77013bc58d07886d4b1122389f503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 13 Dec 2012 17:57:58 +0000 Subject: [PATCH] androidcamera: Fix some compiler warnings --- sys/androidcamera/gst-android-hardware-camera.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/androidcamera/gst-android-hardware-camera.c b/sys/androidcamera/gst-android-hardware-camera.c index 09940b662d..fada85e6f9 100644 --- a/sys/androidcamera/gst-android-hardware-camera.c +++ b/sys/androidcamera/gst-android-hardware-camera.c @@ -294,11 +294,14 @@ gst_ah_camera_on_auto_focus (JNIEnv * env, jclass klass, jboolean success, } static JNINativeMethod native_methods[] = { - {"gst_ah_camera_on_preview_frame", "([BLandroid/hardware/Camera;JJ)V", + {(gchar *) "gst_ah_camera_on_preview_frame", + (gchar *) "([BLandroid/hardware/Camera;JJ)V", (void *) gst_ah_camera_on_preview_frame}, - {"gst_ah_camera_on_error", "(ILandroid/hardware/Camera;JJ)V", + {(gchar *) "gst_ah_camera_on_error", + (gchar *) "(ILandroid/hardware/Camera;JJ)V", (void *) gst_ah_camera_on_error}, - {"gst_ah_camera_on_auto_focus", "(ZLandroid/hardware/Camera;JJ)V", + {(gchar *) "gst_ah_camera_on_auto_focus", + (gchar *) "(ZLandroid/hardware/Camera;JJ)V", (void *) gst_ah_camera_on_auto_focus} }; @@ -2898,7 +2901,7 @@ gst_ahc_parameters_get_supported_preview_fps_range (GstAHCParameters * self) jintArray range = java_util_iterator_next (env, iterator); if (range) { - jint *fps = malloc (sizeof (jint) * 2); + jint *fps = g_new (jint, 2); (*env)->GetIntArrayRegion (env, range, 0, 2, fps); ret = g_list_append (ret, fps);