[vlc-devel] [RFC PATCH 5/7] mediacodec: abort if there is no valid video size

Thomas Guillem thomas at gllm.fr
Thu Apr 23 19:30:53 CEST 2015


---
 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 7856de9..0192f4d 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;
     }
 
-- 
2.1.3




More information about the vlc-devel mailing list