shithub: opus

Download patch

ref: 21b131fbe52a4e5e5c0376ceb0da627ce04e715f
parent: 1bf1da3c962a8c8bf397918c82102c2a157cb6dd
author: Jean-Marc Valin <[email protected]>
date: Thu Nov 21 09:42:00 EST 2013

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

--- a/doc/trivial_example.c
+++ b/doc/trivial_example.c
@@ -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
--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -1913,7 +1913,7 @@
     }
     /* 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)