[Android] LibVLC: Fix Displaymanager renderer detection

Geoffrey Métais git at videolan.org
Fri Dec 7 17:02:51 CET 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Dec  7 17:00:43 2018 +0100| [f36f9b4d07eb62be1afa40c5e241ba286b00547d] | committer: Geoffrey Métais

LibVLC: Fix Displaymanager renderer detection

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

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

diff --git a/libvlc/src/org/videolan/libvlc/util/DisplayManager.java b/libvlc/src/org/videolan/libvlc/util/DisplayManager.java
index de69ec785..d7e7cbc6c 100644
--- a/libvlc/src/org/videolan/libvlc/util/DisplayManager.java
+++ b/libvlc/src/org/videolan/libvlc/util/DisplayManager.java
@@ -44,10 +44,11 @@ public class DisplayManager {
         mMediaRouter = (MediaRouter) activity.getApplicationContext().getSystemService(Context.MEDIA_ROUTER_SERVICE);
         mTextureView = textureView;
         mPresentation = !(cloneMode || benchmark) ? createPresentation() : null;
-        mDisplayType = benchmark ? DisplayType.PRIMARY : getCurrentType();
         if (mSelectedRenderer != null) {
             mSelectedRenderer.observeForever(mRendererObs);
+            mRendererItem = mSelectedRenderer.getValue();
         }
+        mDisplayType = benchmark ? DisplayType.PRIMARY : getCurrentType();
     }
 
     public boolean isPrimary() {



More information about the Android mailing list