[vlc-commits] omxil: Limit input buffer size for qdsp6

Ming Hu git at videolan.org
Tue Oct 11 12:41:15 CEST 2011


vlc | branch: master | Ming Hu <tewilove at gmail.com> | Tue Oct 11 11:34:21 2011 +0300| [16ea90d70500eb15470ab3b91b724e5846c0f8b0] | committer: Jean-Baptiste Kempf

omxil: Limit input buffer size for qdsp6

This fixes trac ticket 5393.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/codec/omxil/omxil.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/modules/codec/omxil/omxil.c b/modules/codec/omxil/omxil.c
index 06328d0c..3e13835 100644
--- a/modules/codec/omxil/omxil.c
+++ b/modules/codec/omxil/omxil.c
@@ -264,6 +264,16 @@ static OMX_ERRORTYPE ImplementationSpecificWorkarounds(decoder_t *p_dec,
             def->format.video.xFramerate >>= 16;
         }
     }
+    else if (!strncmp(p_sys->psz_component, "OMX.qcom.video.decoder.",
+                      strlen("OMX.qcom.video.decoder")))
+    {
+        /* qdsp6 refuses buffer size larger than 450K on input port */
+        if (def->nBufferSize > 450 * 1024)
+        {
+            def->nBufferSize = 450 * 1024;
+            p_port->i_frame_size = def->nBufferSize;
+        }
+    }
 
     return OMX_ErrorNone;
 }



More information about the vlc-commits mailing list