[Android] LibVLC: Media: use OMX codec only if forced

Thomas Guillem git at videolan.org
Wed Sep 14 16:44:35 CEST 2016


vlc-android | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Sep 14 16:43:42 2016 +0200| [a260b70cfda9e35796729bdbc7eff9ba7093cb65] | committer: Thomas Guillem

LibVLC: Media: use OMX codec only if forced

Since this vlc module is still way more unstable than MediaCodec.

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

 libvlc/src/org/videolan/libvlc/Media.java | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/libvlc/src/org/videolan/libvlc/Media.java b/libvlc/src/org/videolan/libvlc/Media.java
index 94c5385..1633a00 100644
--- a/libvlc/src/org/videolan/libvlc/Media.java
+++ b/libvlc/src/org/videolan/libvlc/Media.java
@@ -771,12 +771,10 @@ public class Media extends VLCObject<Media.Event> {
         addOption(":network-caching=1500");
 
         final StringBuilder sb = new StringBuilder(":codec=");
-        if (decoder == HWDecoderUtil.Decoder.MEDIACODEC)
+        if (decoder == HWDecoderUtil.Decoder.MEDIACODEC || decoder == HWDecoderUtil.Decoder.ALL)
             sb.append(getMediaCodecModule()).append(",");
-        else if (decoder == HWDecoderUtil.Decoder.OMX)
+        if (force && (decoder == HWDecoderUtil.Decoder.OMX || decoder == HWDecoderUtil.Decoder.ALL))
             sb.append("iomx,");
-        else
-            sb.append(getMediaCodecModule()).append(",iomx,");
         sb.append("all");
 
         addOption(sb.toString());



More information about the Android mailing list