shithub: opus

Download patch

ref: b570f1a91053c3633fff047134279719d9039c0b
parent: b3dae4b02633dcbe86829b72300b4f13c04c7c41
author: Jean-Marc Valin <[email protected]>
date: Sun Feb 6 12:32:30 EST 2011

Fix previous commit by still capping what the encoder will produce

--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -924,6 +924,8 @@
    if (nbCompressedBytes<2 || pcm==NULL)
      return CELT_BAD_ARG;
 
+   /* Can't produce more than 1275 output bytes */
+   nbCompressedBytes = IMIN(nbCompressedBytes,1275);
    frame_size *= st->upsample;
    for (LM=0;LM<=st->mode->maxLM;LM++)
       if (st->mode->shortMdctSize<<LM==frame_size)