encode_size() moved out of opus_encoder.c

This commit is contained in:
Jean-Marc Valin 2011-08-23 02:56:12 -04:00
parent 6696a1443b
commit 9f555bc4e7
3 changed files with 17 additions and 12 deletions

View file

@ -42,18 +42,7 @@ struct OpusRepacketizer {
int framesize;
};
static int encode_size(int size, unsigned char *data)
{
if (size < 252)
{
data[0] = size;
return 1;
} else {
data[0] = 252+(size&0x3);
data[1] = (size-(int)data[0])>>2;
return 2;
}
}
int opus_repacketizer_get_size(void)
{