Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
b530e2e3
Commit
b530e2e3
authored
Oct 08, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/vorbisdec: use av_freep(), do not leave stale pointers in memory
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
3c1378ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
vorbisdec.c
libavcodec/vorbisdec.c
+10
-10
No files found.
libavcodec/vorbisdec.c
View file @
b530e2e3
...
...
@@ -196,7 +196,7 @@ static void vorbis_free(vorbis_context *vc)
if
(
vc
->
residues
)
for
(
i
=
0
;
i
<
vc
->
residue_count
;
i
++
)
av_free
(
vc
->
residues
[
i
].
classifs
);
av_free
p
(
&
vc
->
residues
[
i
].
classifs
);
av_freep
(
&
vc
->
residues
);
av_freep
(
&
vc
->
modes
);
...
...
@@ -205,7 +205,7 @@ static void vorbis_free(vorbis_context *vc)
if
(
vc
->
codebooks
)
for
(
i
=
0
;
i
<
vc
->
codebook_count
;
++
i
)
{
av_free
(
vc
->
codebooks
[
i
].
codevectors
);
av_free
p
(
&
vc
->
codebooks
[
i
].
codevectors
);
ff_free_vlc
(
&
vc
->
codebooks
[
i
].
vlc
);
}
av_freep
(
&
vc
->
codebooks
);
...
...
@@ -213,21 +213,21 @@ static void vorbis_free(vorbis_context *vc)
if
(
vc
->
floors
)
for
(
i
=
0
;
i
<
vc
->
floor_count
;
++
i
)
{
if
(
vc
->
floors
[
i
].
floor_type
==
0
)
{
av_free
(
vc
->
floors
[
i
].
data
.
t0
.
map
[
0
]);
av_free
(
vc
->
floors
[
i
].
data
.
t0
.
map
[
1
]);
av_free
(
vc
->
floors
[
i
].
data
.
t0
.
book_list
);
av_free
(
vc
->
floors
[
i
].
data
.
t0
.
lsp
);
av_free
p
(
&
vc
->
floors
[
i
].
data
.
t0
.
map
[
0
]);
av_free
p
(
&
vc
->
floors
[
i
].
data
.
t0
.
map
[
1
]);
av_free
p
(
&
vc
->
floors
[
i
].
data
.
t0
.
book_list
);
av_free
p
(
&
vc
->
floors
[
i
].
data
.
t0
.
lsp
);
}
else
{
av_free
(
vc
->
floors
[
i
].
data
.
t1
.
list
);
av_free
p
(
&
vc
->
floors
[
i
].
data
.
t1
.
list
);
}
}
av_freep
(
&
vc
->
floors
);
if
(
vc
->
mappings
)
for
(
i
=
0
;
i
<
vc
->
mapping_count
;
++
i
)
{
av_free
(
vc
->
mappings
[
i
].
magnitude
);
av_free
(
vc
->
mappings
[
i
].
angle
);
av_free
(
vc
->
mappings
[
i
].
mux
);
av_free
p
(
&
vc
->
mappings
[
i
].
magnitude
);
av_free
p
(
&
vc
->
mappings
[
i
].
angle
);
av_free
p
(
&
vc
->
mappings
[
i
].
mux
);
}
av_freep
(
&
vc
->
mappings
);
}
...
...
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