Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
482516c5
Commit
482516c5
authored
Apr 23, 2004
by
gbazin
Browse files
* modules/codec/ffmpeg/encoder.c: fixed memory leak.
parent
dc8116dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/codec/ffmpeg/encoder.c
View file @
482516c5
...
...
@@ -313,9 +313,6 @@ int E_(OpenEncoder)( vlc_object_t *p_this )
p_enc
->
fmt_in
.
i_codec
=
AOUT_FMT_S16_NE
;
p_context
->
sample_rate
=
p_enc
->
fmt_in
.
audio
.
i_rate
;
p_context
->
channels
=
p_enc
->
fmt_in
.
audio
.
i_channels
;
p_sys
->
i_frame_size
=
p_context
->
frame_size
*
2
*
p_context
->
channels
;
p_sys
->
p_buffer
=
malloc
(
p_sys
->
i_frame_size
);
p_sys
->
p_buffer_out
=
malloc
(
2
*
AVCODEC_MAX_AUDIO_FRAME_SIZE
);
}
/* Misc parameters */
...
...
@@ -361,6 +358,7 @@ int E_(OpenEncoder)( vlc_object_t *p_this )
if
(
p_enc
->
fmt_in
.
i_cat
==
AUDIO_ES
)
{
p_sys
->
p_buffer_out
=
malloc
(
2
*
AVCODEC_MAX_AUDIO_FRAME_SIZE
);
p_sys
->
i_frame_size
=
p_context
->
frame_size
*
2
*
p_context
->
channels
;
p_sys
->
p_buffer
=
malloc
(
p_sys
->
i_frame_size
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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