Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/celt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jean-marc.valin@usherbrooke.ca>2011-02-07 01:32:30 +0300
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>2011-02-07 01:32:30 +0300
commitb570f1a91053c3633fff047134279719d9039c0b (patch)
tree064c7f49fe6ae7b3eefe941d8e9b32a74d45113e
parentb3dae4b02633dcbe86829b72300b4f13c04c7c41 (diff)
Fix previous commit by still capping what the encoder will produce
-rw-r--r--libcelt/celt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libcelt/celt.c b/libcelt/celt.c
index 26667e4..6fefd01 100644
--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -924,6 +924,8 @@ int celt_encode_with_ec_float(CELTEncoder * restrict st, const celt_sig * pcm, i
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)