Fixed problem of input task being stuck when input stream stops:
[processor-sdk/performance-audio-sr.git] / pasdk / test_dsp / framework / audioStreamInpDec.c
index 3da417719d40e4faba5164440da8cfb89a931b8e..6cf54662f1a3a9ba95038019800a1db420e6c1fb 100644 (file)
@@ -134,9 +134,10 @@ Int asipDecodeProcessing(
     // Check if source has configured to NONE
     tempVar8 = sharedMemReadInt8(&(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
                                  GATEMP_INDEX_DEC);
     // Check if source has configured to NONE
     tempVar8 = sharedMemReadInt8(&(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
                                  GATEMP_INDEX_DEC);
-    if (tempVar8 == PAF_SOURCE_NONE) {
+    if (tempVar8 == PAF_SOURCE_NONE || sourceSelect == PAF_SOURCE_NONE) {
         TRACE_VERBOSE0("PAF_ASIT_decodeProcessing: sourceSelect == PAF_SOURCE_NONE");
         pAsitCfg->inpDec.state = QUIT;   // skip processing, quit decoding
         TRACE_VERBOSE0("PAF_ASIT_decodeProcessing: sourceSelect == PAF_SOURCE_NONE");
         pAsitCfg->inpDec.state = QUIT;   // skip processing, quit decoding
+        retVal = ASIP_ERR_DECODE_QUIT;
     }
 
     // Process commands (decode)
     }
 
     // Process commands (decode)