summaryrefslogtreecommitdiffstats
path: root/libavcodec/truemotion2.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2016-06-06 13:20:17 +0200
committerDiego Biurrun <diego@biurrun.de>2017-02-07 18:27:21 +0100
commita25dac976a4478331e4db86d44c3db4456c93eff (patch)
treebe0638f8ebcb9e00dfdad10a73d0fc5ccee03293 /libavcodec/truemotion2.c
parent71a49fe25f2e4468fbbadbebef8d073b1b3cc1a5 (diff)
downloadffmpeg-streaming-a25dac976a4478331e4db86d44c3db4456c93eff.zip
ffmpeg-streaming-a25dac976a4478331e4db86d44c3db4456c93eff.tar.gz
Use bitstream_init8() where appropriate
Diffstat (limited to 'libavcodec/truemotion2.c')
-rw-r--r--libavcodec/truemotion2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c
index 99884be..333451c 100644
--- a/libavcodec/truemotion2.c
+++ b/libavcodec/truemotion2.c
@@ -306,7 +306,7 @@ static int tm2_read_stream(TM2Context *ctx, const uint8_t *buf, int stream_id, i
pos = bytestream2_tell(&gb);
if (skip <= pos)
return AVERROR_INVALIDDATA;
- bitstream_init(&ctx->bc, buf + pos, (skip - pos) * 8);
+ bitstream_init8(&ctx->bc, buf + pos, skip - pos);
if ((ret = tm2_read_deltas(ctx, stream_id)) < 0)
return ret;
bytestream2_skip(&gb, ((bitstream_tell(&ctx->bc) + 31) >> 5) << 2);
@@ -323,7 +323,7 @@ static int tm2_read_stream(TM2Context *ctx, const uint8_t *buf, int stream_id, i
pos = bytestream2_tell(&gb);
if (skip <= pos)
return AVERROR_INVALIDDATA;
- bitstream_init(&ctx->bc, buf + pos, (skip - pos) * 8);
+ bitstream_init8(&ctx->bc, buf + pos, skip - pos);
if ((ret = tm2_build_huff_table(ctx, &codes)) < 0)
return ret;
bytestream2_skip(&gb, ((bitstream_tell(&ctx->bc) + 31) >> 5) << 2);
@@ -342,7 +342,7 @@ static int tm2_read_stream(TM2Context *ctx, const uint8_t *buf, int stream_id, i
pos = bytestream2_tell(&gb);
if (skip <= pos)
return AVERROR_INVALIDDATA;
- bitstream_init(&ctx->bc, buf + pos, (skip - pos) * 8);
+ bitstream_init8(&ctx->bc, buf + pos, skip - pos);
for (i = 0; i < toks; i++) {
if (bitstream_bits_left(&ctx->bc) <= 0) {
av_log(ctx->avctx, AV_LOG_ERROR, "Incorrect number of tokens: %i\n", toks);
OpenPOWER on IntegriCloud