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
f08ca91b
Commit
f08ca91b
authored
Apr 30, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/ivi_common: Use av_mallocz_array()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
8532566e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
ivi_common.c
libavcodec/ivi_common.c
+3
-3
No files found.
libavcodec/ivi_common.c
View file @
f08ca91b
...
...
@@ -300,7 +300,7 @@ av_cold int ff_ivi_init_planes(IVIPlaneDesc *planes, const IVIPicConfig *cfg)
planes
[
1
].
num_bands
=
planes
[
2
].
num_bands
=
cfg
->
chroma_bands
;
for
(
p
=
0
;
p
<
3
;
p
++
)
{
planes
[
p
].
bands
=
av_mallocz
(
planes
[
p
].
num_bands
*
sizeof
(
IVIBandDesc
));
planes
[
p
].
bands
=
av_mallocz
_array
(
planes
[
p
].
num_bands
,
sizeof
(
IVIBandDesc
));
if
(
!
planes
[
p
].
bands
)
return
AVERROR
(
ENOMEM
);
...
...
@@ -366,7 +366,7 @@ static int ivi_init_tiles(IVIBandDesc *band, IVITile *ref_tile,
band
->
mb_size
);
av_freep
(
&
tile
->
mbs
);
tile
->
mbs
=
av_mallocz
(
tile
->
num_MBs
*
sizeof
(
IVIMbInfo
));
tile
->
mbs
=
av_mallocz
_array
(
tile
->
num_MBs
,
sizeof
(
IVIMbInfo
));
if
(
!
tile
->
mbs
)
return
AVERROR
(
ENOMEM
);
...
...
@@ -410,7 +410,7 @@ av_cold int ff_ivi_init_tiles(IVIPlaneDesc *planes,
band
->
num_tiles
=
x_tiles
*
y_tiles
;
av_freep
(
&
band
->
tiles
);
band
->
tiles
=
av_mallocz
(
band
->
num_tiles
*
sizeof
(
IVITile
));
band
->
tiles
=
av_mallocz
_array
(
band
->
num_tiles
,
sizeof
(
IVITile
));
if
(
!
band
->
tiles
)
return
AVERROR
(
ENOMEM
);
...
...
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