This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
每一帧aac数据大概430字节左右,如果红色部分填写这个数值,就会报错,因为小于最小的minInBufSize 3840
如果填写g_audio[deviceID].inBufSize就没有问题 ,但是g_audio[deviceID].inBufSize远远大于430,是否会引起播放空数据的问题?
应该怎么解决这个问题?积累几帧aac数据再一起解码?
g_audio[deviceID].inBufSize = (PCM_ONE_PACKET_FRAME * 4) / 2;
if (g_audio[deviceID].inBufSize < adecParams.minInBufSize)
g_audio[deviceID].inBufSize = adecParams.minInBufSize;
decPrm.inBuf.dataBufSize = 430;
decPrm.inBuf.dataBuf = g_audio[0].inBuf;
decPrm.outBuf.dataBufSize = g_audio[0].outBufSize;
decPrm.outBuf.dataBuf = g_audio[0].outBuf;
//printf("rate : %d, channels ; %d, size : %d\n", rate, channels, size);
if(Adec_process(g_audio[0].decHandle, &g_audio[0].decPrm) < 0){
printf("Adec_process error!\n");
return -1;
}