Applies padding to all CBR packets, including PLC and CELT silence

This commit is contained in:
Jean-Marc Valin 2013-11-21 14:42:00 -05:00
parent 1bf1da3c96
commit 21b131fbe5
2 changed files with 2 additions and 2 deletions

View file

@ -35,7 +35,7 @@
#include <opus.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 SAMPLE_RATE 48000
#define CHANNELS 2

View file

@ -1913,7 +1913,7 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_
}
/* Count ToC and redundancy */
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)