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
8ab2173e
Commit
8ab2173e
authored
Feb 06, 2013
by
James Almer
Committed by
Paul B Mahol
Feb 06, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/bink: Chech for malloc failure
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
6c388848
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
bink.c
libavcodec/bink.c
+9
-2
No files found.
libavcodec/bink.c
View file @
8ab2173e
...
...
@@ -170,7 +170,7 @@ static void init_lengths(BinkContext *c, int width, int bw)
*
* @param c decoder context
*/
static
av_cold
void
init_bundles
(
BinkContext
*
c
)
static
av_cold
int
init_bundles
(
BinkContext
*
c
)
{
int
bw
,
bh
,
blocks
;
int
i
;
...
...
@@ -181,8 +181,12 @@ static av_cold void init_bundles(BinkContext *c)
for
(
i
=
0
;
i
<
BINKB_NB_SRC
;
i
++
)
{
c
->
bundle
[
i
].
data
=
av_malloc
(
blocks
*
64
);
if
(
!
c
->
bundle
[
i
].
data
)
return
AVERROR
(
ENOMEM
);
c
->
bundle
[
i
].
data_end
=
c
->
bundle
[
i
].
data
+
blocks
*
64
;
}
return
0
;
}
/**
...
...
@@ -1304,7 +1308,10 @@ static av_cold int decode_init(AVCodecContext *avctx)
ff_dsputil_init
(
&
c
->
dsp
,
avctx
);
ff_binkdsp_init
(
&
c
->
bdsp
);
init_bundles
(
c
);
if
((
ret
=
init_bundles
(
c
))
<
0
)
{
free_bundles
(
c
);
return
ret
;
}
if
(
c
->
version
==
'b'
)
{
if
(
!
binkb_initialised
)
{
...
...
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