Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
4eaced54
Commit
4eaced54
authored
Mar 23, 2007
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed invalid free.
parent
ef3cb264
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
modules/codec/x264.c
modules/codec/x264.c
+8
-12
No files found.
modules/codec/x264.c
View file @
4eaced54
...
...
@@ -635,6 +635,8 @@ struct encoder_sys_t
uint8_t
*
p_buffer
;
mtime_t
i_last_ref_pts
;
char
*
psz_stat_name
;
};
/*****************************************************************************
...
...
@@ -684,6 +686,7 @@ static int Open ( vlc_object_t *p_this )
p_enc
->
pf_encode_audio
=
NULL
;
p_enc
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
encoder_sys_t
)
);
p_sys
->
i_last_ref_pts
=
0
;
p_sys
->
psz_stat_name
=
NULL
;
x264_param_default
(
&
p_sys
->
param
);
p_sys
->
param
.
i_width
=
p_enc
->
fmt_in
.
video
.
i_width
;
...
...
@@ -1092,9 +1095,9 @@ static int Open ( vlc_object_t *p_this )
var_Get
(
p_enc
,
SOUT_CFG_PREFIX
"stats"
,
&
val
);
if
(
val
.
psz_string
)
{
p_sys
->
param
.
rc
.
psz_stat_in
=
val
.
psz_string
;
p_sys
->
param
.
rc
.
psz_stat_out
=
val
.
psz_string
;
free
(
val
.
psz_string
)
;
p_sys
->
param
.
rc
.
psz_stat_in
=
p_sys
->
param
.
rc
.
psz_stat_out
=
p_sys
->
psz_stat_name
=
val
.
psz_string
;
}
var_Get
(
p_enc
,
SOUT_CFG_PREFIX
"pass"
,
&
val
);
...
...
@@ -1222,15 +1225,8 @@ static void Close( vlc_object_t *p_this )
encoder_t
*
p_enc
=
(
encoder_t
*
)
p_this
;
encoder_sys_t
*
p_sys
=
p_enc
->
p_sys
;
if
(
p_sys
->
param
.
rc
.
b_stat_read
)
{
free
(
p_sys
->
param
.
rc
.
psz_stat_in
);
}
if
(
p_sys
->
param
.
rc
.
b_stat_write
)
{
free
(
p_sys
->
param
.
rc
.
psz_stat_out
);
}
if
(
p_sys
->
psz_stat_name
)
free
(
p_sys
->
psz_stat_name
);
x264_encoder_close
(
p_sys
->
h
);
free
(
p_sys
->
p_buffer
);
...
...
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