[Android] VLCInstance: getter should be synchronized

Thomas Guillem git at videolan.org
Wed May 27 12:37:57 CEST 2015


vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed May 27 12:10:57 2015 +0200| [6d43b2269d5e15ca5390d7049e61ee1e27c51f54] | committer: Jean-Baptiste Kempf

VLCInstance: getter should be synchronized

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

 vlc-android/src/org/videolan/vlc/util/VLCInstance.java |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/util/VLCInstance.java b/vlc-android/src/org/videolan/vlc/util/VLCInstance.java
index 8737c01..6001584 100644
--- a/vlc-android/src/org/videolan/vlc/util/VLCInstance.java
+++ b/vlc-android/src/org/videolan/vlc/util/VLCInstance.java
@@ -67,7 +67,7 @@ public class VLCInstance {
         return sLibVLC;
     }
 
-    public static MediaPlayer getMainMediaPlayer() {
+    public static synchronized MediaPlayer getMainMediaPlayer() {
         if (sMediaPlayer == null)
             sMediaPlayer = new MediaPlayer(sLibVLC);
         return sMediaPlayer;



More information about the Android mailing list