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
a450ec26
Commit
a450ec26
authored
Sep 08, 2015
by
Andrew Stone
Committed by
Michael Niedermayer
Sep 08, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/libvorbisdec: Fix memory leak
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
14355873
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
libvorbisdec.c
libavcodec/libvorbisdec.c
+5
-2
No files found.
libavcodec/libvorbisdec.c
View file @
a450ec26
...
@@ -32,6 +32,8 @@ typedef struct OggVorbisDecContext {
...
@@ -32,6 +32,8 @@ typedef struct OggVorbisDecContext {
ogg_packet
op
;
/**< ogg packet */
ogg_packet
op
;
/**< ogg packet */
}
OggVorbisDecContext
;
}
OggVorbisDecContext
;
static
int
oggvorbis_decode_close
(
AVCodecContext
*
avccontext
);
static
int
oggvorbis_decode_init
(
AVCodecContext
*
avccontext
)
{
static
int
oggvorbis_decode_init
(
AVCodecContext
*
avccontext
)
{
OggVorbisDecContext
*
context
=
avccontext
->
priv_data
;
OggVorbisDecContext
*
context
=
avccontext
->
priv_data
;
uint8_t
*
p
=
avccontext
->
extradata
;
uint8_t
*
p
=
avccontext
->
extradata
;
...
@@ -110,8 +112,7 @@ static int oggvorbis_decode_init(AVCodecContext *avccontext) {
...
@@ -110,8 +112,7 @@ static int oggvorbis_decode_init(AVCodecContext *avccontext) {
return
0
;
return
0
;
error:
error:
vorbis_info_clear
(
&
context
->
vi
);
oggvorbis_decode_close
(
avccontext
);
vorbis_comment_clear
(
&
context
->
vc
)
;
return
ret
;
return
ret
;
}
}
...
@@ -187,6 +188,8 @@ static int oggvorbis_decode_frame(AVCodecContext *avccontext, void *data,
...
@@ -187,6 +188,8 @@ static int oggvorbis_decode_frame(AVCodecContext *avccontext, void *data,
static
int
oggvorbis_decode_close
(
AVCodecContext
*
avccontext
)
{
static
int
oggvorbis_decode_close
(
AVCodecContext
*
avccontext
)
{
OggVorbisDecContext
*
context
=
avccontext
->
priv_data
;
OggVorbisDecContext
*
context
=
avccontext
->
priv_data
;
vorbis_block_clear
(
&
context
->
vb
);
vorbis_dsp_clear
(
&
context
->
vd
);
vorbis_info_clear
(
&
context
->
vi
)
;
vorbis_info_clear
(
&
context
->
vi
)
;
vorbis_comment_clear
(
&
context
->
vc
)
;
vorbis_comment_clear
(
&
context
->
vc
)
;
...
...
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