Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
cdab2dbf
Commit
cdab2dbf
authored
Jul 19, 2007
by
Philippe Morin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add input check.
Avoid mallocing/freeing a libvlc_exception_t (end).
parent
2f29e4ff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
bindings/java/src/core-jni.cc
bindings/java/src/core-jni.cc
+5
-5
bindings/java/src/input-jni.cc
bindings/java/src/input-jni.cc
+8
-3
No files found.
bindings/java/src/core-jni.cc
View file @
cdab2dbf
...
...
@@ -54,9 +54,9 @@ JNIEXPORT jlong JNICALL Java_org_videolan_jvlc_JVLC_createInstance (JNIEnv *env,
int
argc
;
const
char
**
argv
;
libvlc_exception_t
*
exception
=
(
libvlc_exception_t
*
)
malloc
(
sizeof
(
libvlc_exception_t
)
)
;
libvlc_exception_t
exception
;
libvlc_exception_init
(
exception
);
libvlc_exception_init
(
&
exception
);
argc
=
(
int
)
env
->
GetArrayLength
((
jarray
)
args
);
argv
=
(
const
char
**
)
malloc
(
argc
*
sizeof
(
char
*
));
...
...
@@ -67,9 +67,9 @@ JNIEXPORT jlong JNICALL Java_org_videolan_jvlc_JVLC_createInstance (JNIEnv *env,
);
}
res
=
(
long
)
libvlc_new
(
argc
,
(
char
**
)
argv
,
exception
);
free
(
exception
)
;
res
=
(
long
)
libvlc_new
(
argc
,
(
char
**
)
argv
,
&
exception
);
CHECK_EXCEPTION
;
return
res
;
...
...
bindings/java/src/input-jni.cc
View file @
cdab2dbf
...
...
@@ -24,9 +24,7 @@
*****************************************************************************/
#include <jni.h>
#include <vlc/libvlc.h>
/* JVLC internal imports, generated by gcjh */
#include "../includes/Input.h"
#include "utils.h"
...
...
@@ -117,7 +115,11 @@ JNIEXPORT jboolean JNICALL Java_org_videolan_jvlc_Input__1isPlaying (JNIEnv *env
vlc_bool_t
res
=
0
;
GET_INPUT_THREAD
;
if
(
input
==
NULL
)
{
return
false
;
}
res
=
libvlc_media_instance_will_play
(
input
,
&
exception
);
libvlc_media_instance_release
(
input
);
CHECK_EXCEPTION
;
...
...
@@ -132,6 +134,9 @@ JNIEXPORT jboolean JNICALL Java_org_videolan_jvlc_Input__1hasVout (JNIEnv *env,
GET_INPUT_THREAD
;
if
(
input
==
NULL
)
{
return
false
;
}
res
=
libvlc_media_instance_has_vout
(
input
,
&
exception
);
libvlc_media_instance_release
(
input
);
CHECK_EXCEPTION
;
...
...
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