summaryrefslogtreecommitdiff
path: root/libavcodec/mpc8.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/mpc8.c')
-rw-r--r--libavcodec/mpc8.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c
index 7a075e3c15..cb30b2c28b 100644
--- a/libavcodec/mpc8.c
+++ b/libavcodec/mpc8.c
@@ -419,6 +419,8 @@ static int mpc8_decode_frame(AVCodecContext * avctx, void *data,
c->cur_frame++;
c->last_bits_used = get_bits_count(gb);
+ if(get_bits_left(gb) < 8) // we have only padding left
+ c->last_bits_used = buf_size << 3;
if(c->cur_frame >= c->frames)
c->cur_frame = 0;