summaryrefslogtreecommitdiff
path: root/apps/codecs/libspeex/cb_search.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libspeex/cb_search.c')
-rw-r--r--apps/codecs/libspeex/cb_search.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/codecs/libspeex/cb_search.c b/apps/codecs/libspeex/cb_search.c
index 1090af0e08..ad883cc07f 100644
--- a/apps/codecs/libspeex/cb_search.c
+++ b/apps/codecs/libspeex/cb_search.c
@@ -359,7 +359,11 @@ int update_target
359 /*"erase" nbest list*/ 359 /*"erase" nbest list*/
360 for (j=0;j<N;j++) 360 for (j=0;j<N;j++)
361 ndist[j]=VERY_LARGE32; 361 ndist[j]=VERY_LARGE32;
362 362 /* This is not strictly necessary, but it provides an additonal safety
363 to prevent crashes in case something goes wrong in the previous
364 steps (e.g. NaNs) */
365 for (j=0;j<N;j++)
366 best_nind[j] = best_ntarget[j] = 0;
363 /*For all n-bests of previous subvector*/ 367 /*For all n-bests of previous subvector*/
364 for (j=0;j<N;j++) 368 for (j=0;j<N;j++)
365 { 369 {
@@ -397,6 +401,7 @@ int update_target
397 best_nind[n] = best_nind[n-1]; 401 best_nind[n] = best_nind[n-1];
398 best_ntarget[n] = best_ntarget[n-1]; 402 best_ntarget[n] = best_ntarget[n-1];
399 } 403 }
404 /* n is equal to m here, so they're interchangeable */
400 ndist[m] = err; 405 ndist[m] = err;
401 best_nind[n] = best_index[k]; 406 best_nind[n] = best_index[k];
402 best_ntarget[n] = j; 407 best_ntarget[n] = j;