mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
ahc: Fail gracefully if our callback class can't be found
Instead of just ignoring that error and then calling JNI functions with NULL, which will kill the virtual machine. The error handling here needs some further improvements though, errors in more places are just ignored.
This commit is contained in:
parent
551b0a5f28
commit
c9d9042aff
1 changed files with 3 additions and 0 deletions
|
@ -1663,6 +1663,9 @@ _init_classes (void)
|
|||
gst_amc_jni_get_class (env, &err,
|
||||
"org/freedesktop/gstreamer/androidmedia/GstAhcCallback");
|
||||
}
|
||||
if (!org_freedesktop_gstreamer_androidmedia_gstahccallback.klass)
|
||||
goto failed;
|
||||
|
||||
org_freedesktop_gstreamer_androidmedia_gstahccallback.constructor =
|
||||
gst_amc_jni_get_method_id (env, &err,
|
||||
org_freedesktop_gstreamer_androidmedia_gstahccallback.klass, "<init>",
|
||||
|
|
Loading…
Reference in a new issue