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
d42a6192
Commit
d42a6192
authored
Apr 13, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/psymodel: use av_malloc(z)_array()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
5ec81929
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
psymodel.c
libavcodec/psymodel.c
+5
-5
No files found.
libavcodec/psymodel.c
View file @
d42a6192
...
@@ -35,10 +35,10 @@ av_cold int ff_psy_init(FFPsyContext *ctx, AVCodecContext *avctx, int num_lens,
...
@@ -35,10 +35,10 @@ av_cold int ff_psy_init(FFPsyContext *ctx, AVCodecContext *avctx, int num_lens,
int
i
,
j
,
k
=
0
;
int
i
,
j
,
k
=
0
;
ctx
->
avctx
=
avctx
;
ctx
->
avctx
=
avctx
;
ctx
->
ch
=
av_mallocz
(
sizeof
(
ctx
->
ch
[
0
])
*
avctx
->
channels
*
2
);
ctx
->
ch
=
av_mallocz
_array
(
sizeof
(
ctx
->
ch
[
0
]),
avctx
->
channels
*
2
);
ctx
->
group
=
av_mallocz
(
sizeof
(
ctx
->
group
[
0
])
*
num_groups
);
ctx
->
group
=
av_mallocz
_array
(
sizeof
(
ctx
->
group
[
0
]),
num_groups
);
ctx
->
bands
=
av_malloc
(
sizeof
(
ctx
->
bands
[
0
])
*
num_lens
);
ctx
->
bands
=
av_malloc
_array
(
sizeof
(
ctx
->
bands
[
0
]),
num_lens
);
ctx
->
num_bands
=
av_malloc
(
sizeof
(
ctx
->
num_bands
[
0
])
*
num_lens
);
ctx
->
num_bands
=
av_malloc
_array
(
sizeof
(
ctx
->
num_bands
[
0
]),
num_lens
);
memcpy
(
ctx
->
bands
,
bands
,
sizeof
(
ctx
->
bands
[
0
])
*
num_lens
);
memcpy
(
ctx
->
bands
,
bands
,
sizeof
(
ctx
->
bands
[
0
])
*
num_lens
);
memcpy
(
ctx
->
num_bands
,
num_bands
,
sizeof
(
ctx
->
num_bands
[
0
])
*
num_lens
);
memcpy
(
ctx
->
num_bands
,
num_bands
,
sizeof
(
ctx
->
num_bands
[
0
])
*
num_lens
);
...
@@ -112,7 +112,7 @@ av_cold struct FFPsyPreprocessContext* ff_psy_preprocess_init(AVCodecContext *av
...
@@ -112,7 +112,7 @@ av_cold struct FFPsyPreprocessContext* ff_psy_preprocess_init(AVCodecContext *av
FF_FILTER_MODE_LOWPASS
,
FILT_ORDER
,
FF_FILTER_MODE_LOWPASS
,
FILT_ORDER
,
cutoff_coeff
,
0
.
0
,
0
.
0
);
cutoff_coeff
,
0
.
0
,
0
.
0
);
if
(
ctx
->
fcoeffs
)
{
if
(
ctx
->
fcoeffs
)
{
ctx
->
fstate
=
av_mallocz
(
sizeof
(
ctx
->
fstate
[
0
])
*
avctx
->
channels
);
ctx
->
fstate
=
av_mallocz
_array
(
sizeof
(
ctx
->
fstate
[
0
]),
avctx
->
channels
);
for
(
i
=
0
;
i
<
avctx
->
channels
;
i
++
)
for
(
i
=
0
;
i
<
avctx
->
channels
;
i
++
)
ctx
->
fstate
[
i
]
=
ff_iir_filter_init_state
(
FILT_ORDER
);
ctx
->
fstate
[
i
]
=
ff_iir_filter_init_state
(
FILT_ORDER
);
}
}
...
...
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