Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 689497fb authored by James Dong's avatar James Dong Committed by Android Git Automerger
Browse files

am 457d5ae3: Fix a potential(observed sometimes) media server crash

parents 34e5d967 457d5ae3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -317,7 +317,7 @@ android_media_MediaRecorder_prepare(JNIEnv *env, jobject thiz)

    jobject surface = env->GetObjectField(thiz, fields.surface);
    if (surface != NULL) {
        const sp<Surface>& native_surface = get_surface(env, surface);
        const sp<Surface> native_surface = get_surface(env, surface);
        LOGI("prepare: surface=%p (identity=%d)", native_surface.get(), native_surface->getIdentity());
        if (process_media_recorder_call(env, mr->setPreviewSurface(native_surface), "java/lang/RuntimeException", "setPreviewSurface failed.")) {
            return;