diff options
author | Reynaldo H. Verdejo Pinochet <reynaldo@opendot.cl> | 2008-12-20 02:38:34 +0000 |
---|---|---|
committer | Reynaldo H. Verdejo Pinochet <reynaldo@opendot.cl> | 2008-12-20 02:38:34 +0000 |
commit | 3f16ed15df2f573b3246f79c1f576429217ac755 (patch) | |
tree | 58f5219e45b04c425aef8258edd2823679f9ac2f /libavcodec/qcelpdec.c | |
parent | 64e74b68a40a8d0656989cffd12b59ba688965cb (diff) | |
download | ffmpeg-3f16ed15df2f573b3246f79c1f576429217ac755.tar.gz |
Cosmetics by Kenan Gillet. Part 1 of 3 of his 'qcelp: silence handling'
changeset.
Originally committed as revision 16244 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/qcelpdec.c')
-rw-r--r-- | libavcodec/qcelpdec.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/qcelpdec.c b/libavcodec/qcelpdec.c index 098b8f6f69..32b2cadbec 100644 --- a/libavcodec/qcelpdec.c +++ b/libavcodec/qcelpdec.c @@ -536,7 +536,12 @@ static void apply_pitch_filters(QCELPContext *q, float *cdn_vector) } }else { - float max_pitch_gain = q->erasure_count < 3 ? 0.9 - 0.3 * (q->erasure_count - 1) : 0.0; + float max_pitch_gain; + + if (q->erasure_count < 3) + max_pitch_gain = 0.9 - 0.3 * (q->erasure_count - 1); + else + max_pitch_gain = 0.0; for(i=0; i<4; i++) q->pitch_gain[i] = FFMIN(q->pitch_gain[i], max_pitch_gain); |