瀏覽代碼

Fixed the problem of printing omx debug information when decoding H264/H265 files

Signed-off-by: sw.multimedia <sw.multimedia@starfivetech.com>
sw.multimedia 2 年之前
父節點
當前提交
8951cdda82
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      soft_3rdpart/omx-il/component/video/dec/SF_OMX_Vdec_decoder.c

+ 7 - 0
soft_3rdpart/omx-il/component/video/dec/SF_OMX_Vdec_decoder.c

@@ -89,6 +89,13 @@ static void OnEventArrived(Component com, unsigned long event, void *data, void
     case COMPONENT_EVENT_DEC_FILL_BUFFER_DONE:
     {
         struct timeval tv;
+
+        /*Before each execution of getomxbufferbyaddr, check whether there are still members in the queue*/
+        PortContainerExternal *output = (PortContainerExternal*)pSfVideoImplement->functions->ComponentPortPeekData(&((ComponentImpl *)com)->sinkPort);
+        if (output == NULL) {
+            return;
+        }
+
         pOMXBuffer = GetOMXBufferByAddr(pSfOMXComponent, (OMX_U8 *)pPortContainerExternal->pBuffer);
         if (pOMXBuffer == NULL)
         {