avcodec/svq1dec: Add assert to ensure "stages >= 0"

This is currently always true, the assert protects against
future changes to the code breaking this assumtation

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-02-03 23:03:38 +01:00
parent cba3a46e93
commit 741b56fcee
1 changed files with 2 additions and 0 deletions

View File

@ -193,6 +193,7 @@ static int svq1_decode_block_intra(GetBitContext *bitbuf, uint8_t *pixels,
stages, level);
return AVERROR_INVALIDDATA; /* invalid vector */
}
av_assert0(stages >= 0);
mean = get_vlc2(bitbuf, svq1_intra_mean.table, 8, 3);
@ -255,6 +256,7 @@ static int svq1_decode_block_non_intra(GetBitContext *bitbuf, uint8_t *pixels,
stages, level);
return AVERROR_INVALIDDATA; /* invalid vector */
}
av_assert0(stages >= 0);
mean = get_vlc2(bitbuf, svq1_inter_mean.table, 9, 3) - 256;