Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLC-Android
Commits
b01969a4
Commit
b01969a4
authored
Dec 25, 2014
by
Edward Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aout: free dangling global reference
parent
df5cadf5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
libvlc/jni/aout.c
libvlc/jni/aout.c
+1
-0
libvlc/jni/libvlcjni.c
libvlc/jni/libvlcjni.c
+2
-2
No files found.
libvlc/jni/aout.c
View file @
b01969a4
...
...
@@ -243,6 +243,7 @@ void aout_close(void *opaque)
}
(
*
p_env
)
->
DeleteGlobalRef
(
p_env
,
p_sys
->
buffer
);
(
*
p_env
)
->
DeleteGlobalRef
(
p_env
,
p_sys
->
j_libVlc
);
jni_detach_thread
();
free
(
p_sys
);
}
...
...
libvlc/jni/libvlcjni.c
View file @
b01969a4
...
...
@@ -417,9 +417,9 @@ void Java_org_videolan_libvlc_LibVLC_playMRL(JNIEnv *env, jobject thiz,
/* Create a media player playing environment */
libvlc_media_player_t
*
mp
=
libvlc_media_player_new
(
p_instance
);
libvlc_media_player_set_video_title_display
(
mp
,
libvlc_position_disable
,
0
);
jobject
myJavaLibVLC
=
(
*
env
)
->
NewGlobalRef
(
env
,
thiz
);
jobject
myJavaLibVLC
=
(
*
env
)
->
NewGlobalRef
(
env
,
thiz
);
// freed in aout_close
//
i
f AOUT_AUDIOTRACK_JAVA,
we
use amem
//
I
f AOUT_AUDIOTRACK_JAVA, use amem
jclass
cls
=
(
*
env
)
->
GetObjectClass
(
env
,
thiz
);
jmethodID
methodId
=
(
*
env
)
->
GetMethodID
(
env
,
cls
,
"getAout"
,
"()I"
);
if
(
(
*
env
)
->
CallIntMethod
(
env
,
thiz
,
methodId
)
==
AOUT_AUDIOTRACK_JAVA
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment