diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index 11e9904983..5358967704 100644 --- a/libavcodec/wavpack.c +++ b/libavcodec/wavpack.c @@ -405,12 +405,12 @@ static inline int wv_get_value_integer(WavpackFrameContext *s, uint32_t *crc, in } bit = (S & s->and) | s->or; - bit = (((S + bit) << s->shift) - bit); + bit = (((S + bit) << s->shift) - bit) << s->post_shift; if(s->hybrid) bit = av_clip(bit, -s->hybrid_maxclip, s->hybrid_maxclip - 1); - return bit << s->post_shift; + return bit; } static float wv_get_value_float(WavpackFrameContext *s, uint32_t *crc, int S)