diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2013-11-10 03:28:40 +0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2013-11-10 03:28:40 +0400 |
commit | ca6fac041bc6ffe4a8b21eb6ee429dd32d803764 (patch) | |
tree | 1f2a30d22bf28b82c2168f65afe0e9c4856b30ec /src | |
parent | a599ccd2172c159cb690a8b446bb4b3986d594fb (diff) |
Fixes some minor issues found by scan build
Diffstat (limited to 'src')
-rw-r--r-- | src/analysis.c | 2 | ||||
-rw-r--r-- | src/opus_decoder.c | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/analysis.c b/src/analysis.c index 2dd087b8..3ee206c9 100644 --- a/src/analysis.c +++ b/src/analysis.c @@ -317,7 +317,6 @@ void tonality_analysis(TonalityAnalysisState *tonal, AnalysisInfo *info_out, con } relativeE = 0; frame_loudness = 0; - bandwidth_mask = 0; for (b=0;b<NB_TBANDS;b++) { float E=0, tE=0, nE=0; @@ -597,7 +596,6 @@ void tonality_analysis(TonalityAnalysisState *tonal, AnalysisInfo *info_out, con if (tonal->speech_confidence_count==0) tonal->speech_confidence = .1f; } - psum = MAX16(tonal->speech_confidence, MIN16(tonal->music_confidence, psum)); } if (tonal->last_music != (tonal->music_prob>.5f)) tonal->last_transition=0; diff --git a/src/opus_decoder.c b/src/opus_decoder.c index fc6f7b04..e7964e3d 100644 --- a/src/opus_decoder.c +++ b/src/opus_decoder.c @@ -297,8 +297,8 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data, } } - pcm_transition_silk_size = 0; - pcm_transition_celt_size = 0; + pcm_transition_silk_size = ALLOC_NONE; + pcm_transition_celt_size = ALLOC_NONE; if (data!=NULL && st->prev_mode > 0 && ( (mode == MODE_CELT_ONLY && st->prev_mode != MODE_CELT_ONLY && !st->prev_redundancy) || (mode != MODE_CELT_ONLY && st->prev_mode == MODE_CELT_ONLY) ) @@ -327,7 +327,7 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data, } /* Don't allocate any memory when in CELT-only mode */ - pcm_silk_size = (mode != MODE_CELT_ONLY) ? IMAX(F10, frame_size)*st->channels : 0; + pcm_silk_size = (mode != MODE_CELT_ONLY) ? IMAX(F10, frame_size)*st->channels : ALLOC_NONE; ALLOC(pcm_silk, pcm_silk_size, opus_int16); /* SILK processing */ |