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
c1611340
Commit
c1611340
authored
Apr 23, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/snow_dwt: use av_malloc(z)_array()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
f21c263c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
snow_dwt.c
libavcodec/snow_dwt.c
+3
-3
No files found.
libavcodec/snow_dwt.c
View file @
c1611340
...
...
@@ -35,17 +35,17 @@ int ff_slice_buffer_init(slice_buffer *buf, int line_count,
buf
->
line_count
=
line_count
;
buf
->
line_width
=
line_width
;
buf
->
data_count
=
max_allocated_lines
;
buf
->
line
=
av_mallocz
(
sizeof
(
IDWTELEM
*
)
*
line_count
);
buf
->
line
=
av_mallocz
_array
(
line_count
,
sizeof
(
IDWTELEM
*
)
);
if
(
!
buf
->
line
)
return
AVERROR
(
ENOMEM
);
buf
->
data_stack
=
av_malloc
(
sizeof
(
IDWTELEM
*
)
*
max_allocated_lines
);
buf
->
data_stack
=
av_malloc
_array
(
max_allocated_lines
,
sizeof
(
IDWTELEM
*
)
);
if
(
!
buf
->
data_stack
)
{
av_freep
(
&
buf
->
line
);
return
AVERROR
(
ENOMEM
);
}
for
(
i
=
0
;
i
<
max_allocated_lines
;
i
++
)
{
buf
->
data_stack
[
i
]
=
av_malloc
(
sizeof
(
IDWTELEM
)
*
line_width
);
buf
->
data_stack
[
i
]
=
av_malloc
_array
(
line_width
,
sizeof
(
IDWTELEM
)
);
if
(
!
buf
->
data_stack
[
i
])
{
for
(
i
--
;
i
>=
0
;
i
--
)
av_freep
(
&
buf
->
data_stack
[
i
]);
...
...
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