From b570f1a91053c3633fff047134279719d9039c0b Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca> Date: Sun, 6 Feb 2011 17:32:30 -0500 Subject: [PATCH] Fix previous commit by still capping what the encoder will produce --- libcelt/celt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libcelt/celt.c b/libcelt/celt.c index 26667e44..6fefd012 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) -- GitLab