mirror of
https://github.com/xiph/opus.git
synced 2025-05-21 10:58:30 +00:00
Applies padding to all CBR packets, including PLC and CELT silence
This commit is contained in:
parent
1bf1da3c96
commit
21b131fbe5
2 changed files with 2 additions and 2 deletions
|
@ -35,7 +35,7 @@
|
||||||
#include <opus.h>
|
#include <opus.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
/*The frame size in hardcoded for this sample code but it doesn't have to be*/
|
/*The frame size is hardcoded for this sample code but it doesn't have to be*/
|
||||||
#define FRAME_SIZE 960
|
#define FRAME_SIZE 960
|
||||||
#define SAMPLE_RATE 48000
|
#define SAMPLE_RATE 48000
|
||||||
#define CHANNELS 2
|
#define CHANNELS 2
|
||||||
|
|
|
@ -1913,7 +1913,7 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_
|
||||||
}
|
}
|
||||||
/* Count ToC and redundancy */
|
/* Count ToC and redundancy */
|
||||||
ret += 1+redundancy_bytes;
|
ret += 1+redundancy_bytes;
|
||||||
if (!st->use_vbr && ret >= 3)
|
if (!st->use_vbr)
|
||||||
{
|
{
|
||||||
if (opus_packet_pad(data, ret, max_data_bytes) != OPUS_OK)
|
if (opus_packet_pad(data, ret, max_data_bytes) != OPUS_OK)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue