aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-03 23:03:38 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-03 23:03:38 +0100
commit741b56fceece2b2de53466b952ed60b61544cc60 (patch)
treef6953c438e49ef5a03e16e75509caebafd0ccc98
parentcba3a46e936cca55d37bebf2e6b381c9a7c5d372 (diff)
downloadffmpeg-741b56fceece2b2de53466b952ed60b61544cc60.tar.gz
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>
-rw-r--r--libavcodec/svq1dec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c
index 94846538fc..a95c7c866e 100644
--- a/libavcodec/svq1dec.c
+++ b/libavcodec/svq1dec.c
@@ -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;