[vlc-devel] commit: release method added (Filippo Carone )
git version control
git at videolan.org
Wed Apr 9 00:32:02 CEST 2008
vlc | branch: master | Filippo Carone <littlejohn at videolan.org> | Tue Apr 8 23:41:59 2008 +0200| [fa096e6093bfa4e4e47cfec000e5e34944e2545e]
release method added
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fa096e6093bfa4e4e47cfec000e5e34944e2545e
---
.../java/org/videolan/jvlc/MediaDescriptor.java | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/bindings/java/core/src/main/java/org/videolan/jvlc/MediaDescriptor.java b/bindings/java/core/src/main/java/org/videolan/jvlc/MediaDescriptor.java
index 7e863d3..727f157 100644
--- a/bindings/java/core/src/main/java/org/videolan/jvlc/MediaDescriptor.java
+++ b/bindings/java/core/src/main/java/org/videolan/jvlc/MediaDescriptor.java
@@ -36,6 +36,7 @@ public class MediaDescriptor
private LibVlcMediaDescriptor instance;
private LibVlc libvlc;
private LibVlcEventManager eventManager;
+ private boolean released;
/**
* @param jvlc The jvlc instance to create the media descriptor for.
@@ -79,7 +80,7 @@ public class MediaDescriptor
@Override
protected void finalize() throws Throwable
{
- libvlc.libvlc_media_release(instance);
+ release();
super.finalize();
}
@@ -102,4 +103,19 @@ public class MediaDescriptor
{
return libvlc;
}
+
+ /**
+ *
+ */
+ public void release()
+ {
+ if (released)
+ {
+ return;
+ }
+ released = true;
+ libvlc.libvlc_media_release(instance);
+ }
+
+
}
More information about the vlc-devel
mailing list