diff options
Diffstat (limited to 'chromium/third_party/ffmpeg/libavcodec/truemotion2.c')
-rw-r--r-- | chromium/third_party/ffmpeg/libavcodec/truemotion2.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/chromium/third_party/ffmpeg/libavcodec/truemotion2.c b/chromium/third_party/ffmpeg/libavcodec/truemotion2.c index a1683f5b1ad..c3c2701ee54 100644 --- a/chromium/third_party/ffmpeg/libavcodec/truemotion2.c +++ b/chromium/third_party/ffmpeg/libavcodec/truemotion2.c @@ -24,6 +24,8 @@ * Duck TrueMotion2 decoder. */ +#include <inttypes.h> + #include "avcodec.h" #include "bytestream.h" #include "get_bits.h" @@ -246,7 +248,8 @@ static inline int tm2_read_header(TM2Context *ctx, const uint8_t *buf) case TM2_NEW_HEADER_MAGIC: return 0; default: - av_log(ctx->avctx, AV_LOG_ERROR, "Not a TM2 header: 0x%08X\n", magic); + av_log(ctx->avctx, AV_LOG_ERROR, "Not a TM2 header: 0x%08"PRIX32"\n", + magic); return AVERROR_INVALIDDATA; } } @@ -259,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; } |