[Android] LibVLC: MediaPlayer: don't wait for vout deletion

Thomas Guillem git at videolan.org
Mon May 23 15:54:07 CEST 2016


vlc-android | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon May 23 15:52:06 2016 +0200| [1bdfb81a6aaf88212ca742dcf6db547e44cbccd6] | committer: Thomas Guillem

LibVLC: MediaPlayer: don't wait for vout deletion

MediaPlayer.stop() is enough to ensure that the surface  won't be used anymore.

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

 libvlc/src/org/videolan/libvlc/MediaPlayer.java | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/libvlc/src/org/videolan/libvlc/MediaPlayer.java b/libvlc/src/org/videolan/libvlc/MediaPlayer.java
index e0e09b1..d8e92b6 100644
--- a/libvlc/src/org/videolan/libvlc/MediaPlayer.java
+++ b/libvlc/src/org/videolan/libvlc/MediaPlayer.java
@@ -358,17 +358,6 @@ public class MediaPlayer extends VLCObject<MediaPlayer.Event> {
             }
             if (disableVideo)
                 setVideoTrackEnabled(false);
-            synchronized (MediaPlayer.this) {
-                /* Wait for Vout destruction (mVoutCount = 0) in order to be sure that the surface is not
-                 * used after leaving this callback. This shouldn't be needed when using MediaCodec or
-                 * AndroidWindow (i.e. after Android 2.3) since the surface is ref-counted */
-                while (mVoutCount > 0) {
-                    try {
-                        MediaPlayer.this.wait();
-                    } catch (InterruptedException ignored) {
-                    }
-                }
-            }
         }
     });
 



More information about the Android mailing list