mirror of https://git.ffmpeg.org/ffmpeg.git
mpc8: do not leave padding after last frame in buffer for the next decode call
This commit is contained in:
parent
94364b7d42
commit
8f2aa89a5d
|
@ -411,6 +411,8 @@ static int mpc8_decode_frame(AVCodecContext * avctx, void *data,
|
||||||
c->cur_frame++;
|
c->cur_frame++;
|
||||||
|
|
||||||
c->last_bits_used = get_bits_count(gb);
|
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)
|
if(c->cur_frame >= c->frames)
|
||||||
c->cur_frame = 0;
|
c->cur_frame = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue