[vlc-commits] mediacodec: abort if there is no valid video size

Thomas Guillem git at videolan.org
Fri Apr 24 12:14:27 CEST 2015


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Apr 23 14:42:50 2015 +0200| [2a09b420ae6126a8e6b7b457b1e9382ed6afa3d3] | committer: Thomas Guillem

mediacodec: abort if there is no valid video size

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2a09b420ae6126a8e6b7b457b1e9382ed6afa3d3
---

 modules/codec/omxil/android_mediacodec.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/modules/codec/omxil/android_mediacodec.c b/modules/codec/omxil/android_mediacodec.c
index 5474acf..873fb10 100644
--- a/modules/codec/omxil/android_mediacodec.c
+++ b/modules/codec/omxil/android_mediacodec.c
@@ -732,10 +732,12 @@ static int OpenDecoder(vlc_object_t *p_this)
     case VLC_CODEC_VC1:
     case VLC_CODEC_VP8:
     case VLC_CODEC_VP9:
-        break;
+        if (p_dec->fmt_in.video.i_width && p_dec->fmt_in.video.i_height)
+            break;
     default:
-        msg_Dbg(p_dec, "codec %4.4s not supported",
-                (char *)&p_dec->fmt_in.i_codec);
+        msg_Dbg(p_dec, "codec %4.4s or resolution (%dx%d) not supported",
+                (char *)&p_dec->fmt_in.i_codec,
+                p_dec->fmt_in.video.i_width, p_dec->fmt_in.video.i_height);
         return VLC_EGENERIC;
     }
 



More information about the vlc-commits mailing list