1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-06-20 06:16:02 +02:00

avcodec/rangecoder: factorize termination version code

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer
2018-12-19 02:40:18 +01:00
parent 41c1643d75
commit 1be9a28f8e
6 changed files with 10 additions and 12 deletions

View File

@ -106,8 +106,10 @@ void ff_build_rac_states(RangeCoder *c, int factor, int max_p)
}
/* Return the number of bytes written. */
int ff_rac_terminate(RangeCoder *c)
int ff_rac_terminate(RangeCoder *c, int version)
{
if (version == 1)
put_rac(c, (uint8_t[]) { 129 }, 0);
c->range = 0xFF;
c->low += 0xFF;
renorm_encoder(c);