mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 13:08:49 +00:00
playback/player: android: check return values from JNI methods in 'JNI_OnLoad'
This commit is contained in:
parent
c3928830cf
commit
261081aade
1 changed files with 11 additions and 2 deletions
|
@ -474,8 +474,17 @@ JNI_OnLoad (JavaVM * vm, void *reserved)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
jclass klass = (*env)->FindClass (env, "org/freedesktop/gstreamer/Player");
|
jclass klass = (*env)->FindClass (env, "org/freedesktop/gstreamer/Player");
|
||||||
(*env)->RegisterNatives (env, klass, native_methods,
|
if (!klass) {
|
||||||
G_N_ELEMENTS (native_methods));
|
__android_log_print (ANDROID_LOG_ERROR, "GstPlayer",
|
||||||
|
"Could not retrieve class org.freedesktop.gstreamer.Player");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if ((*env)->RegisterNatives (env, klass, native_methods,
|
||||||
|
G_N_ELEMENTS (native_methods))) {
|
||||||
|
__android_log_print (ANDROID_LOG_ERROR, "GstPlayer",
|
||||||
|
"Could not register native methods for org.freedesktop.gstreamer.Player");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
pthread_key_create (¤t_jni_env, detach_current_thread);
|
pthread_key_create (¤t_jni_env, detach_current_thread);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue