ref: 8019e4e32eebd92026052e96670f223fc99667c8
parent: 46185626277853e2d09d4f6a8955f02ecb55e1c1
author: Koen Vos <[email protected]>
date: Thu May 26 18:23:46 EDT 2011
Fixes the case of PLC before receiving any valid packet
--- a/silk/silk_dec_API.c
+++ b/silk/silk_dec_API.c
@@ -112,7 +112,11 @@
for( n = 0; n < decControl->nChannelsInternal; n++ ) {
if( channel_state[ n ].nFramesDecoded == 0 ) {
SKP_int fs_kHz_dec;
- if( decControl->payloadSize_ms == 10 ) {
+ if( decControl->payloadSize_ms == 0 ) {
+ /* Assuming packet loss, use 10 ms */
+ channel_state[ n ].nFramesPerPacket = 1;
+ channel_state[ n ].nb_subfr = 2;
+ } else if( decControl->payloadSize_ms == 10 ) {
channel_state[ n ].nFramesPerPacket = 1;
channel_state[ n ].nb_subfr = 2;
} else if( decControl->payloadSize_ms == 20 ) {