Community
cancel
Showing results for 
Search instead for 
Did you mean: 
jmatthewsr
Beginner
44 Views

uscg711.c GetInfoU nPcmTypes should return 1?

There is only a single PCM record entry for G711 but GetInfoU will return 2 for

pInfo->nPcmTypes, which reads off the end of an array. GetInfoA is correct.

-justin

0 Kudos
3 Replies
PaulF_IntelCorp
Employee
44 Views

Hello Justin,

Perhaps this forum thread will help answer the question:


Paul
jmatthewsr
Beginner
44 Views

Sorry, I still don't see how this can work without running off the end of the array.

uscg711.c GetInfoU() sets:

pInfo->nPcmTypes = 2;
pInfo->pPcmTypesTbl = pcmTypesTbl_G711;

A search for nPcmTypes shows a function SetUSCEncoderPCMType() iterating over the pcmTypesTbl_G711 using nPcmTypes as the upper bound:

for(i=0;ipInfo->nPcmTypes;i++) {

pcmTypesTbl_G711 has only 1 record.

What am I missing?

thanks.
Vyacheslav_Baranniko
New Contributor II
44 Views

Quoting - jmatthewsr
Sorry, I still don't see how this can work without running off the end of the array.

uscg711.c GetInfoU() sets:

pInfo->nPcmTypes = 2;
pInfo->pPcmTypesTbl = pcmTypesTbl_G711;

A search for nPcmTypes shows a function SetUSCEncoderPCMType() iterating over the pcmTypesTbl_G711 using nPcmTypes as the upper bound:

for(i=0;ipInfo->nPcmTypes;i++) {

pcmTypesTbl_G711 has only 1 record.

What am I missing?

thanks.

Hello,

thank you very much for using IPP USC codecs and finding a bug.
Thisis definitely a bug andit will be fixed in one of the nearest IPP samples release.

Vyacheslav, IPP speech