diff options
-rw-r--r-- | libavcodec/h264_cavlc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264_cavlc.c b/libavcodec/h264_cavlc.c index c248137..9440ce0 100644 --- a/libavcodec/h264_cavlc.c +++ b/libavcodec/h264_cavlc.c @@ -441,7 +441,7 @@ static int decode_residual(H264Context *h, GetBitContext *gb, DCTELEM *block, in mask= -(level_code&1); level[trailing_ones]= (((2+level_code)>>1) ^ mask) - mask; }else{ - if(trailing_ones < 3) level_code += (level_code>>31)|1; + level_code += ((level_code>>31)|1) & -(trailing_ones < 3); suffix_length = 1; if(level_code + 3U > 6U) |