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
4f3b058c
Commit
4f3b058c
authored
Feb 14, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cavs: initialize various context tables to 0
Avoids crashes with corrupted files. CC:libav-stable@libav.org
parent
0dff40bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
cavs.c
libavcodec/cavs.c
+9
-9
No files found.
libavcodec/cavs.c
View file @
4f3b058c
...
...
@@ -708,17 +708,17 @@ void ff_cavs_init_pic(AVSContext *h) {
*/
void
ff_cavs_init_top_lines
(
AVSContext
*
h
)
{
/* alloc top line of predictors */
h
->
top_qp
=
av_malloc
(
h
->
mb_width
);
h
->
top_mv
[
0
]
=
av_malloc
((
h
->
mb_width
*
2
+
1
)
*
sizeof
(
cavs_vector
));
h
->
top_mv
[
1
]
=
av_malloc
((
h
->
mb_width
*
2
+
1
)
*
sizeof
(
cavs_vector
));
h
->
top_pred_Y
=
av_malloc
(
h
->
mb_width
*
2
*
sizeof
(
*
h
->
top_pred_Y
));
h
->
top_border_y
=
av_malloc
((
h
->
mb_width
+
1
)
*
16
);
h
->
top_border_u
=
av_malloc
(
h
->
mb_width
*
10
);
h
->
top_border_v
=
av_malloc
(
h
->
mb_width
*
10
);
h
->
top_qp
=
av_malloc
z
(
h
->
mb_width
);
h
->
top_mv
[
0
]
=
av_malloc
z
((
h
->
mb_width
*
2
+
1
)
*
sizeof
(
cavs_vector
));
h
->
top_mv
[
1
]
=
av_malloc
z
((
h
->
mb_width
*
2
+
1
)
*
sizeof
(
cavs_vector
));
h
->
top_pred_Y
=
av_malloc
z
(
h
->
mb_width
*
2
*
sizeof
(
*
h
->
top_pred_Y
));
h
->
top_border_y
=
av_malloc
z
((
h
->
mb_width
+
1
)
*
16
);
h
->
top_border_u
=
av_malloc
z
(
h
->
mb_width
*
10
);
h
->
top_border_v
=
av_malloc
z
(
h
->
mb_width
*
10
);
/* alloc space for co-located MVs and types */
h
->
col_mv
=
av_malloc
(
h
->
mb_width
*
h
->
mb_height
*
4
*
sizeof
(
cavs_vector
));
h
->
col_type_base
=
av_malloc
(
h
->
mb_width
*
h
->
mb_height
);
h
->
col_mv
=
av_malloc
z
(
h
->
mb_width
*
h
->
mb_height
*
4
*
sizeof
(
cavs_vector
));
h
->
col_type_base
=
av_malloc
z
(
h
->
mb_width
*
h
->
mb_height
);
h
->
block
=
av_mallocz
(
64
*
sizeof
(
int16_t
));
}
...
...
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