diff --git a/libavcodec/g723_1dec.c b/libavcodec/g723_1dec.c index ab952ec66d..f92eb76ba0 100644 --- a/libavcodec/g723_1dec.c +++ b/libavcodec/g723_1dec.c @@ -668,6 +668,8 @@ static int estimate_sid_gain(G723_1_Context *p) else t = INT32_MAX; } else t = p->sid_gain << shift; + } else if(shift < -31) { + t = (p->sid_gain < 0) ? -1 : 0; }else t = p->sid_gain >> -shift; x = av_clipl_int32(t * (int64_t)cng_filt[0] >> 16);