diff options
Diffstat (limited to 'libavcodec/proresdec_lgpl.c')
-rw-r--r-- | libavcodec/proresdec_lgpl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/proresdec_lgpl.c b/libavcodec/proresdec_lgpl.c index a3d762bf08..89e5582a37 100644 --- a/libavcodec/proresdec_lgpl.c +++ b/libavcodec/proresdec_lgpl.c @@ -427,13 +427,13 @@ static inline void decode_ac_coeffs(GetBitContext *gb, DCTELEM *out, lev_cb_index = lev_to_cb_index[FFMIN(level, 9)]; bits_left = get_bits_left(gb); - if (bits_left <= 8 && !show_bits(gb, bits_left)) + if (bits_left <= 0 || (bits_left <= 8 && !show_bits(gb, bits_left))) return; run = decode_vlc_codeword(gb, ac_codebook[run_cb_index]); bits_left = get_bits_left(gb); - if (bits_left <= 8 && !show_bits(gb, bits_left)) + if (bits_left <= 0 || (bits_left <= 8 && !show_bits(gb, bits_left))) return; level = decode_vlc_codeword(gb, ac_codebook[lev_cb_index]) + 1; |