[Android] libvlc: MediaBrowser: retain libvlc

Thomas Guillem git at videolan.org
Thu May 28 18:20:02 CEST 2015


vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu May 28 18:19:51 2015 +0200| [749a6aabadd546e3f79a6943f9e5ed19d63f58b2] | committer: Thomas Guillem

libvlc: MediaBrowser: retain libvlc

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=749a6aabadd546e3f79a6943f9e5ed19d63f58b2
---

 libvlc/src/org/videolan/libvlc/util/MediaBrowser.java |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libvlc/src/org/videolan/libvlc/util/MediaBrowser.java b/libvlc/src/org/videolan/libvlc/util/MediaBrowser.java
index 4bc0819..8a50aa4 100644
--- a/libvlc/src/org/videolan/libvlc/util/MediaBrowser.java
+++ b/libvlc/src/org/videolan/libvlc/util/MediaBrowser.java
@@ -74,7 +74,8 @@ public class MediaBrowser {
     }
 
     public MediaBrowser(LibVLC libvlc, EventListener listener) {
-        mLibVlc = libvlc; // XXX mLibVlc.retain();
+        mLibVlc = libvlc;
+        mLibVlc.retain();
         mEventListener = listener;
 
     }
@@ -98,6 +99,7 @@ public class MediaBrowser {
      */
     public synchronized void release() {
         reset();
+        mLibVlc.release();
     }
 
     /**



More information about the Android mailing list