From 21b131fbe52a4e5e5c0376ceb0da627ce04e715f Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin Date: Thu, 21 Nov 2013 14:42:00 -0500 Subject: [PATCH] Applies padding to all CBR packets, including PLC and CELT silence --- doc/trivial_example.c | 2 +- src/opus_encoder.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/trivial_example.c b/doc/trivial_example.c index 692d2608..7a0fc56a 100644 --- a/doc/trivial_example.c +++ b/doc/trivial_example.c @@ -35,7 +35,7 @@ #include #include -/*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 diff --git a/src/opus_encoder.c b/src/opus_encoder.c index 70433d29..d19ed8b9 100644 --- a/src/opus_encoder.c +++ b/src/opus_encoder.c @@ -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)