[Android] [PATCH 1/3] VlcObject: retain return true if the object can be retained
Thomas Guillem
thomas at gllm.fr
Mon Feb 2 18:33:22 CET 2015
---
libvlc/src/org/videolan/libvlc/VLCObject.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/libvlc/src/org/videolan/libvlc/VLCObject.java b/libvlc/src/org/videolan/libvlc/VLCObject.java
index 6359a3b..dc5682e 100644
--- a/libvlc/src/org/videolan/libvlc/VLCObject.java
+++ b/libvlc/src/org/videolan/libvlc/VLCObject.java
@@ -136,10 +136,14 @@ public abstract class VLCObject {
/**
* Increment internal ref count of the native object.
+ * @return true if media is retained
*/
- public synchronized final void retain() {
- if (mNativeRefCount > 0)
+ public synchronized final boolean retain() {
+ if (mNativeRefCount > 0) {
mNativeRefCount++;
+ return true;
+ } else
+ return false;
}
/**
--
2.1.3
More information about the Android
mailing list