summaryrefslogtreecommitdiff
path: root/libavcodec/mss1.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/mss1.c')
-rw-r--r--libavcodec/mss1.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/mss1.c b/libavcodec/mss1.c
index a579d9d9a4..84b7a37007 100644
--- a/libavcodec/mss1.c
+++ b/libavcodec/mss1.c
@@ -56,6 +56,8 @@ static void arith_normalise(ArithCoder *c)
c->low <<= 1;
c->high <<= 1;
c->high |= 1;
+ if (get_bits_left(c->gbc.gb) < 1)
+ c->overread++;
c->value |= get_bits1(c->gbc.gb);
}
}
@@ -112,6 +114,7 @@ static void arith_init(ArithCoder *c, GetBitContext *gb)
c->low = 0;
c->high = 0xFFFF;
c->value = get_bits(gb, 16);
+ c->overread = 0;
c->gbc.gb = gb;
c->get_model_sym = arith_get_model_sym;
c->get_number = arith_get_number;