Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mark Harris
Opus
Commits
18c1c22e
Commit
18c1c22e
authored
May 30, 2009
by
Jean-Marc Valin
Browse files
Fix for a mode memory leak -- was still allocating memory for the energy
allocator which was removed a while ago.
parent
aa936256
Changes
1
Hide whitespace changes
Inline
Side-by-side
libcelt/modes.c
View file @
18c1c22e
...
...
@@ -207,7 +207,7 @@ static void compute_pbands(CELTMode *mode, int res)
static
void
compute_allocation_table
(
CELTMode
*
mode
,
int
res
)
{
int
i
,
j
,
nBark
;
celt_int16_t
*
allocVectors
,
*
allocEnergy
;
celt_int16_t
*
allocVectors
;
const
int
C
=
CHANNELS
(
mode
);
/* Find the number of critical bands supported by our sampling rate */
...
...
@@ -217,7 +217,6 @@ static void compute_allocation_table(CELTMode *mode, int res)
mode
->
nbAllocVectors
=
BITALLOC_SIZE
;
allocVectors
=
celt_alloc
(
sizeof
(
celt_int16_t
)
*
(
BITALLOC_SIZE
*
mode
->
nbEBands
));
allocEnergy
=
celt_alloc
(
sizeof
(
celt_int16_t
)
*
(
mode
->
nbAllocVectors
*
(
mode
->
nbEBands
+
1
)));
/* Compute per-codec-band allocation from per-critical-band matrix */
for
(
i
=
0
;
i
<
BITALLOC_SIZE
;
i
++
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment