[FFmpeg-cvslog] avcodec/truemotion2: replace impossible condition by av_assert2
Michael Niedermayer
git at videolan.org
Sun Apr 27 05:45:46 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Apr 27 05:20:04 2014 +0200| [bc3234062d0820613046e56882b2f01f6bfa4144] | committer: Michael Niedermayer
avcodec/truemotion2: replace impossible condition by av_assert2
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bc3234062d0820613046e56882b2f01f6bfa4144
---
libavcodec/truemotion2.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c
index 543ecbb..c3c2701 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;
}
More information about the ffmpeg-cvslog
mailing list