mirror of
https://github.com/xiph/opus.git
synced 2025-05-28 14:19:13 +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
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue