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
77df9de7
Commit
77df9de7
authored
May 03, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcdoec/snowenc: use av_mallocz_array()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
cc861581
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
snowenc.c
libavcodec/snowenc.c
+3
-3
No files found.
libavcodec/snowenc.c
View file @
77df9de7
...
...
@@ -72,7 +72,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
s
->
m
.
bit_rate
=
avctx
->
bit_rate
;
s
->
m
.
me
.
temp
=
s
->
m
.
me
.
scratchpad
=
av_mallocz
((
avctx
->
width
+
64
)
*
2
*
16
*
2
*
sizeof
(
uint8_t
));
s
->
m
.
me
.
scratchpad
=
av_mallocz
_array
((
avctx
->
width
+
64
),
2
*
16
*
2
*
sizeof
(
uint8_t
));
s
->
m
.
me
.
map
=
av_mallocz
(
ME_MAP_SIZE
*
sizeof
(
uint32_t
));
s
->
m
.
me
.
score_map
=
av_mallocz
(
ME_MAP_SIZE
*
sizeof
(
uint32_t
));
s
->
m
.
obmc_scratchpad
=
av_mallocz
(
MB_SIZE
*
MB_SIZE
*
12
*
sizeof
(
uint32_t
));
...
...
@@ -131,8 +131,8 @@ static av_cold int encode_init(AVCodecContext *avctx)
int
i
;
int
size
=
s
->
b_width
*
s
->
b_height
<<
2
*
s
->
block_max_depth
;
for
(
i
=
0
;
i
<
s
->
max_ref_frames
;
i
++
){
s
->
ref_mvs
[
i
]
=
av_mallocz
(
size
*
sizeof
(
int16_t
[
2
]));
s
->
ref_scores
[
i
]
=
av_mallocz
(
size
*
sizeof
(
uint32_t
));
s
->
ref_mvs
[
i
]
=
av_mallocz
_array
(
size
,
sizeof
(
int16_t
[
2
]));
s
->
ref_scores
[
i
]
=
av_mallocz
_array
(
size
,
sizeof
(
uint32_t
));
if
(
!
s
->
ref_mvs
[
i
]
||
!
s
->
ref_scores
[
i
])
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