diff options
author | Jean-Marc Valin <jean-marc.valin@usherbrooke.ca> | 2011-02-07 01:32:30 +0300 |
---|---|---|
committer | Jean-Marc Valin <jean-marc.valin@usherbrooke.ca> | 2011-02-07 01:32:30 +0300 |
commit | b570f1a91053c3633fff047134279719d9039c0b (patch) | |
tree | 064c7f49fe6ae7b3eefe941d8e9b32a74d45113e | |
parent | b3dae4b02633dcbe86829b72300b4f13c04c7c41 (diff) |
Fix previous commit by still capping what the encoder will produce
-rw-r--r-- | libcelt/celt.c | 2 |
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) |