Browse Source

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 years ago
parent
commit
8951cdda82
1 changed files with 7 additions and 0 deletions
  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)
         {