mirror of
https://github.com/xiph/opus.git
synced 2025-06-07 07:50:51 +00:00
encode_size() moved out of opus_encoder.c
This commit is contained in:
parent
6696a1443b
commit
9f555bc4e7
3 changed files with 17 additions and 12 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue