|
|
@ -390,7 +390,7 @@ void ff_opus_rc_enc_end(OpusRangeCoder *rc, uint8_t *dst, int size) |
|
|
|
int i, lap; |
|
|
|
int i, lap; |
|
|
|
uint8_t *rb_src, *rb_dst; |
|
|
|
uint8_t *rb_src, *rb_dst; |
|
|
|
ff_opus_rc_put_raw(rc, 0, 32 - rc->rb.cachelen); |
|
|
|
ff_opus_rc_put_raw(rc, 0, 32 - rc->rb.cachelen); |
|
|
|
rb_src = rc->buf + OPUS_MAX_PACKET_SIZE + 12 - rc->rb.bytes; |
|
|
|
rb_src = rc->buf + OPUS_MAX_FRAME_SIZE + 12 - rc->rb.bytes; |
|
|
|
rb_dst = dst + FFMAX(size - rc->rb.bytes, 0); |
|
|
|
rb_dst = dst + FFMAX(size - rc->rb.bytes, 0); |
|
|
|
lap = &dst[rng_bytes] - rb_dst; |
|
|
|
lap = &dst[rng_bytes] - rb_dst; |
|
|
|
for (i = 0; i < lap; i++) |
|
|
|
for (i = 0; i < lap; i++) |
|
|
@ -407,5 +407,5 @@ void ff_opus_rc_enc_init(OpusRangeCoder *rc) |
|
|
|
rc->rem = -1; |
|
|
|
rc->rem = -1; |
|
|
|
rc->ext = 0; |
|
|
|
rc->ext = 0; |
|
|
|
rc->rng_cur = rc->buf; |
|
|
|
rc->rng_cur = rc->buf; |
|
|
|
ff_opus_rc_dec_raw_init(rc, rc->buf + OPUS_MAX_PACKET_SIZE + 8, 0); |
|
|
|
ff_opus_rc_dec_raw_init(rc, rc->buf + OPUS_MAX_FRAME_SIZE + 8, 0); |
|
|
|
} |
|
|
|
} |
|
|
|