Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Ewout ter Hoeven
VLC-Android
Commits
56c7f073
Commit
56c7f073
authored
Jan 21, 2012
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aout: Delete local reference even if global referencing failed
http://java.sun.com/docs/books/jni/html/refs.html
parent
35da541a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
vlc-android/jni/aout.c
vlc-android/jni/aout.c
+2
-3
No files found.
vlc-android/jni/aout.c
View file @
56c7f073
...
...
@@ -89,15 +89,14 @@ int aout_open(void **opaque, char *format, unsigned *rate, unsigned *nb_channels
/* Use a global reference to not reallocate memory each time we run
the play function. */
p_sys
->
buffer
=
(
*
p_env
)
->
NewGlobalRef
(
p_env
,
buffer
);
/* The local reference is no longer useful. */
(
*
p_env
)
->
DeleteLocalRef
(
p_env
,
buffer
);
if
(
p_sys
->
buffer
==
NULL
)
{
LOGE
(
"Couldn't create the global reference!"
);
goto
error
;
}
/* The local reference is no longer useful. */
(
*
p_env
)
->
DeleteLocalRef
(
p_env
,
buffer
);
// Get the play methodId
p_sys
->
play
=
(
*
p_env
)
->
GetMethodID
(
p_env
,
cls
,
"playAudio"
,
"([BI)V"
);
assert
(
p_sys
->
play
!=
NULL
);
...
...
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