Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
195365fa
Commit
195365fa
authored
Jun 09, 2014
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avcodec: use av_malloc/av_free for buffers
Ref #11490
parent
703cfc64
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
modules/codec/avcodec/encoder.c
modules/codec/avcodec/encoder.c
+6
-6
No files found.
modules/codec/avcodec/encoder.c
View file @
195365fa
...
...
@@ -970,7 +970,7 @@ errmsg:
p_sys
->
i_buffer_out
=
av_samples_get_buffer_size
(
NULL
,
p_sys
->
p_context
->
channels
,
p_sys
->
i_frame_size
,
p_sys
->
p_context
->
sample_fmt
,
DEFAULT_ALIGN
);
p_sys
->
p_buffer
=
malloc
(
p_sys
->
i_buffer_out
);
p_sys
->
p_buffer
=
av_
malloc
(
p_sys
->
i_buffer_out
);
if
(
unlikely
(
p_sys
->
p_buffer
==
NULL
)
)
{
goto
error
;
...
...
@@ -984,7 +984,7 @@ errmsg:
if
(
p_sys
->
b_planar
)
{
p_sys
->
p_interleave_buf
=
malloc
(
p_sys
->
i_buffer_out
);
p_sys
->
p_interleave_buf
=
av_
malloc
(
p_sys
->
i_buffer_out
);
if
(
unlikely
(
p_sys
->
p_interleave_buf
==
NULL
)
)
goto
error
;
}
...
...
@@ -1004,8 +1004,8 @@ errmsg:
return
VLC_SUCCESS
;
error:
free
(
p_enc
->
fmt_out
.
p_extra
);
free
(
p_sys
->
p_buffer
);
free
(
p_sys
->
p_interleave_buf
);
av_
free
(
p_sys
->
p_buffer
);
av_
free
(
p_sys
->
p_interleave_buf
);
free
(
p_sys
);
return
VLC_ENOMEM
;
}
...
...
@@ -1447,8 +1447,8 @@ void CloseEncoder( vlc_object_t *p_this )
av_free
(
p_sys
->
p_context
);
free
(
p_sys
->
p_interleave_buf
);
free
(
p_sys
->
p_buffer
);
av_
free
(
p_sys
->
p_interleave_buf
);
av_
free
(
p_sys
->
p_buffer
);
free
(
p_sys
);
}
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