summaryrefslogtreecommitdiff
path: root/libavcodec/mpc8.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2012-08-07 20:22:57 +0200
committerKostya Shishkov <kostya.shishkov@gmail.com>2012-08-08 09:11:38 +0200
commit8f2aa89a5d4e0bc530af7dc7b4d9e9b2d61f7feb (patch)
treef52621acf8984f525827b96e5523f236cba9216d /libavcodec/mpc8.c
parent94364b7d425bdb150f3b92fb94e7cc2a32ef325f (diff)
downloadffmpeg-8f2aa89a5d4e0bc530af7dc7b4d9e9b2d61f7feb.tar.gz
mpc8: do not leave padding after last frame in buffer for the next decode call
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 915a785b81..79225c4275 100644
--- a/libavcodec/mpc8.c
+++ b/libavcodec/mpc8.c
@@ -411,6 +411,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;