[vlc-commits] mediacodec: remove limits for input size

Thomas Guillem git at videolan.org
Thu Sep 3 14:30:25 CEST 2015


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Sep  3 14:25:20 2015 +0200| [9258870fa8c84fada384fedb115b0e0f6ab4f7a6] | committer: Thomas Guillem

mediacodec: remove limits for input size

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

 modules/codec/omxil/mediacodec_jni.c |    7 +++++++
 modules/codec/omxil/mediacodec_ndk.c |    2 ++
 2 files changed, 9 insertions(+)

diff --git a/modules/codec/omxil/mediacodec_jni.c b/modules/codec/omxil/mediacodec_jni.c
index b928a6d..57df988 100644
--- a/modules/codec/omxil/mediacodec_jni.c
+++ b/modules/codec/omxil/mediacodec_jni.c
@@ -479,6 +479,7 @@ static int Start(mc_api *api, const char *psz_name, const char *psz_mime,
     jobject jcodec = NULL;
     jobject jformat = NULL;
     jstring jrotation_string = NULL;
+    jstring jmaxinputsize_string = NULL;
     jobject jinput_buffers = NULL;
     jobject joutput_buffers = NULL;
     jobject jbuffer_info = NULL;
@@ -542,6 +543,10 @@ static int Start(mc_api *api, const char *psz_name, const char *psz_mime,
                                                  p_args->audio.i_sample_rate,
                                                  p_args->audio.i_channel_count);
     }
+    /* No limits for input size */
+    jmaxinputsize_string = (*env)->NewStringUTF(env, "max-input-size");
+    (*env)->CallVoidMethod(env, jformat, jfields.set_integer,
+                           jmaxinputsize_string, 0);
 
     if (b_direct_rendering)
     {
@@ -614,6 +619,8 @@ error:
         (*env)->DeleteLocalRef(env, jformat);
     if (jrotation_string)
         (*env)->DeleteLocalRef(env, jrotation_string);
+    if (jmaxinputsize_string)
+        (*env)->DeleteLocalRef(env, jmaxinputsize_string);
     if (jinput_buffers)
         (*env)->DeleteLocalRef(env, jinput_buffers);
     if (joutput_buffers)
diff --git a/modules/codec/omxil/mediacodec_ndk.c b/modules/codec/omxil/mediacodec_ndk.c
index 6da00d5..dff2f2e 100644
--- a/modules/codec/omxil/mediacodec_ndk.c
+++ b/modules/codec/omxil/mediacodec_ndk.c
@@ -320,6 +320,8 @@ static int Start(mc_api *api, const char *psz_name, const char *psz_mime,
 
     syms.AMediaFormat.setInt32(p_sys->p_format, "encoder", 0);
     syms.AMediaFormat.setString(p_sys->p_format, "mime", psz_mime);
+    /* No limits for input size */
+    syms.AMediaFormat.setInt32(p_sys->p_format, "max-input-size", 0);
     if (api->b_video)
     {
         syms.AMediaFormat.setInt32(p_sys->p_format, "width", p_args->video.i_width);



More information about the vlc-commits mailing list