Fix memset bugs.
authorFrank Livingston <frank-livingston@ti.com>
Wed, 22 Feb 2017 00:11:02 +0000 (18:11 -0600)
committerFrank Livingston <frank-livingston@ti.com>
Wed, 22 Feb 2017 00:11:02 +0000 (18:11 -0600)
pasdk/common/aspDecOpCircBuf_common.c
pasdk/test_dsp/framework/aspDecOpCircBuf_master.c

index 5bca2c467081c53a8b2673e1885927c590504857..099bdfa45984bc8ea5d4e950f8fc91f255423a51 100644 (file)
@@ -98,7 +98,7 @@ Int cbReset(
         // clear PCM data
         for (i=0; i<pCb->maxAFChanNum; i++)
         {
-            memset(pAfCb->data.sample[i], pCb->maxAFSampCount, 0);
+            memset(pAfCb->data.sample[i], 0, pCb->maxAFSampCount);
         }
         
         // clear metadata
index 783768d0eb925242f4478d85333b706e9312cb8a..bdd0d8717d1b9f4693e7834f571fc20954ff6673 100644 (file)
@@ -156,7 +156,7 @@ Int cbInit(
         for (i=0; i<ASP_DECOP_CB_MAX_NUM_PCM_CH; i++)
         {
             pAfCb->data.sample[i] = pPcmBuf;
-            memset(pAfCb->data.sample[i], DEF_DEC_OP_FRAME_LEN, 0);
+            memset(pAfCb->data.sample[i], 0, DEF_DEC_OP_FRAME_LEN);
             pPcmBuf += DEF_DEC_OP_FRAME_LEN;
             
             pAfCb->data.samsiz[i] = 0;
@@ -378,7 +378,7 @@ Int cbInitSourceSel(
         for (i=0; i<pCb->maxAFChanNum; i++)
         {
             pAfCb->data.sample[i] = pPcmBuf;
-            memset(pAfCb->data.sample[i], pCb->maxAFSampCount, 0);
+            memset(pAfCb->data.sample[i], 0, pCb->maxAFSampCount);
             pPcmBuf += pCb->maxAFSampCount;
             
             pAfCb->data.samsiz[i] = 0;