summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-27 05:20:04 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-27 05:20:04 +0200
commitbc3234062d0820613046e56882b2f01f6bfa4144 (patch)
tree99dbb74a229429b2d4f06520ea9df8becd05e45e /libavcodec
parent09b16619d33ddf93005060d0782f28a1c1cbb7f6 (diff)
avcodec/truemotion2: replace impossible condition by av_assert2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/truemotion2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c
index 543ecbbcdf..c3c2701ee5 100644
--- a/libavcodec/truemotion2.c
+++ b/libavcodec/truemotion2.c
@@ -262,7 +262,8 @@ static int tm2_read_deltas(TM2Context *ctx, int stream_id)
d = get_bits(&ctx->gb, 9);
mb = get_bits(&ctx->gb, 5);
- if ((d < 1) || (d > TM2_DELTAS) || (mb < 1) || (mb > 32)) {
+ av_assert2(mb < 32);
+ if ((d < 1) || (d > TM2_DELTAS) || (mb < 1)) {
av_log(ctx->avctx, AV_LOG_ERROR, "Incorrect delta table: %i deltas x %i bits\n", d, mb);
return AVERROR_INVALIDDATA;
}