[FFmpeg-cvslog] mpc8: do not leave padding after last frame in buffer for the next decode call
Kostya Shishkov
git at videolan.org
Thu Aug 9 01:02:21 CEST 2012
ffmpeg | branch: master | Kostya Shishkov <kostya.shishkov at gmail.com> | Tue Aug 7 20:22:57 2012 +0200| [8f2aa89a5d4e0bc530af7dc7b4d9e9b2d61f7feb] | committer: Kostya Shishkov
mpc8: do not leave padding after last frame in buffer for the next decode call
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8f2aa89a5d4e0bc530af7dc7b4d9e9b2d61f7feb
---
libavcodec/mpc8.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c
index 915a785..79225c4 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;
More information about the ffmpeg-cvslog
mailing list