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
942babd8
Commit
942babd8
authored
Sep 09, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/vp56: use av_reallocp_array() and check if allocation failed
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
7883827c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
vp56.c
libavcodec/vp56.c
+6
-4
No files found.
libavcodec/vp56.c
View file @
942babd8
...
...
@@ -475,13 +475,15 @@ static int vp56_size_changed(VP56Context *s)
return
-
1
;
}
s
->
above_blocks
=
av_realloc
(
s
->
above_blocks
,
(
4
*
s
->
mb_width
+
6
)
*
sizeof
(
*
s
->
above_blocks
));
s
->
macroblocks
=
av_realloc
(
s
->
macroblocks
,
s
->
mb_width
*
s
->
mb_height
*
sizeof
(
*
s
->
macroblocks
));
av_reallocp_array
(
&
s
->
above_blocks
,
4
*
s
->
mb_width
+
6
,
sizeof
(
*
s
->
above_blocks
));
av_reallocp_array
(
&
s
->
macroblocks
,
s
->
mb_width
*
s
->
mb_height
,
sizeof
(
*
s
->
macroblocks
));
av_free
(
s
->
edge_emu_buffer_alloc
);
s
->
edge_emu_buffer_alloc
=
av_malloc
(
16
*
stride
);
s
->
edge_emu_buffer
=
s
->
edge_emu_buffer_alloc
;
if
(
!
s
->
above_blocks
||
!
s
->
macroblocks
||
!
s
->
edge_emu_buffer_alloc
)
return
AVERROR
(
ENOMEM
);
if
(
s
->
flip
<
0
)
s
->
edge_emu_buffer
+=
15
*
stride
;
...
...
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