mirror of
https://github.com/xiph/opus.git
synced 2025-05-16 08:28:29 +00:00
Fix minor issues reported by scan-build
This commit is contained in:
parent
96480adaff
commit
b7b5872c9d
4 changed files with 6 additions and 8 deletions
|
@ -1187,7 +1187,6 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm,
|
|||
pre[0] = _pre;
|
||||
pre[1] = _pre + (N+COMBFILTER_MAXPERIOD);
|
||||
|
||||
silence = 1;
|
||||
c=0; do {
|
||||
int count = 0;
|
||||
const opus_val16 * OPUS_RESTRICT pcmp = pcm+c;
|
||||
|
|
|
@ -97,6 +97,8 @@ opus_int silk_Decode( /* O Returns error co
|
|||
opus_int stereo_to_mono;
|
||||
SAVE_STACK;
|
||||
|
||||
silk_assert( decControl->nChannelsInternal == 1 || decControl->nChannelsInternal == 2 );
|
||||
|
||||
/**********************************/
|
||||
/* Test if first frame in payload */
|
||||
/**********************************/
|
||||
|
|
|
@ -191,9 +191,8 @@ opus_int silk_Encode( /* O Returns error co
|
|||
if( prefillFlag ) {
|
||||
/* Only accept input length of 10 ms */
|
||||
if( nBlocksOf10ms != 1 ) {
|
||||
ret = SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES;
|
||||
silk_assert( 0 );
|
||||
return ret;
|
||||
return SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES;
|
||||
}
|
||||
/* Reset Encoder */
|
||||
for( n = 0; n < encControl->nChannelsInternal; n++ ) {
|
||||
|
@ -212,15 +211,13 @@ opus_int silk_Encode( /* O Returns error co
|
|||
} else {
|
||||
/* Only accept input lengths that are a multiple of 10 ms */
|
||||
if( nBlocksOf10ms * encControl->API_sampleRate != 100 * nSamplesIn || nSamplesIn < 0 ) {
|
||||
ret = SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES;
|
||||
silk_assert( 0 );
|
||||
return ret;
|
||||
return SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES;
|
||||
}
|
||||
/* Make sure no more than one packet can be produced */
|
||||
if( 1000 * (opus_int32)nSamplesIn > encControl->payloadSize_ms * encControl->API_sampleRate ) {
|
||||
ret = SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES;
|
||||
silk_assert( 0 );
|
||||
return ret;
|
||||
return SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -987,7 +987,7 @@ opus_int32 test_parse(void)
|
|||
}
|
||||
}
|
||||
fprintf(stdout," code 3 padding (%2d cases) ............... OK.\n",cfgs);
|
||||
cfgs_total+=cfgs;cfgs=0;
|
||||
cfgs_total+=cfgs;
|
||||
fprintf(stdout," opus_packet_parse ............................ OK.\n");
|
||||
fprintf(stdout," All packet parsing tests passed\n");
|
||||
fprintf(stdout," (%d API invocations)\n",cfgs_total);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue