[Android] LibVLC/AWindow: release the surface

Thomas Guillem git at videolan.org
Mon Dec 19 12:07:39 CET 2016


vlc-android | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Dec 15 14:53:35 2016 +0100| [ec54269b4b34d46a510edb03be5beb83a0cf065f] | committer: Thomas Guillem

LibVLC/AWindow: release the surface

> https://code.videolan.org/videolan/vlc-android/commit/ec54269b4b34d46a510edb03be5beb83a0cf065f
---

 libvlc/src/org/videolan/libvlc/AWindow.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libvlc/src/org/videolan/libvlc/AWindow.java b/libvlc/src/org/videolan/libvlc/AWindow.java
index e9cba9d..ef5303c 100644
--- a/libvlc/src/org/videolan/libvlc/AWindow.java
+++ b/libvlc/src/org/videolan/libvlc/AWindow.java
@@ -123,6 +123,8 @@ class AWindow implements IVLCVout {
         }
 
         public void release() {
+            if (AndroidUtil.isICSOrLater())
+                mSurface.release();
             mSurface = null;
             setNativeSurface(mId, null);
             if (mSurfaceHolder != null)



More information about the Android mailing list