[vlc-commits] mediacodec: allow interlaced picture only after API 21

Thomas Guillem git at videolan.org
Tue Apr 28 17:49:37 CEST 2015


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Apr 27 13:34:56 2015 +0200| [61949af475e7ec5b1198cc4376d0b7ebcf166056] | committer: Thomas Guillem

mediacodec: allow interlaced picture only after API 21

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

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

diff --git a/modules/codec/omxil/android_mediacodec.c b/modules/codec/omxil/android_mediacodec.c
index 4824111..4e924fe 100644
--- a/modules/codec/omxil/android_mediacodec.c
+++ b/modules/codec/omxil/android_mediacodec.c
@@ -1396,6 +1396,14 @@ static picture_t *DecodeVideo(decoder_t *p_dec, block_t **pp_block)
     if (p_sys->error_state)
         goto endclean;
 
+    /* Allow interlaced picture only after API 21 */
+    if (p_block && p_block->i_flags & BLOCK_FLAG_INTERLACED_MASK
+        && !(jfields.get_input_buffer && jfields.get_output_buffer))
+    {
+        b_error = true;
+        goto endclean;
+    }
+
     if (!(env = jni_get_env(THREAD_NAME)))
     {
         b_error = true;



More information about the vlc-commits mailing list