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
24b4e6c3
Commit
24b4e6c3
authored
Aug 29, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
snow: Check av_frame_alloc() failures
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
c4224fff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
snow.c
libavcodec/snow.c
+4
-0
snowenc.c
libavcodec/snowenc.c
+2
-0
No files found.
libavcodec/snow.c
View file @
24b4e6c3
...
@@ -462,10 +462,14 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){
...
@@ -462,10 +462,14 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){
for
(
j
=
0
;
j
<
MAX_REF_FRAMES
;
j
++
)
for
(
j
=
0
;
j
<
MAX_REF_FRAMES
;
j
++
)
ff_scale_mv_ref
[
i
][
j
]
=
256
*
(
i
+
1
)
/
(
j
+
1
);
ff_scale_mv_ref
[
i
][
j
]
=
256
*
(
i
+
1
)
/
(
j
+
1
);
s
->
last_picture
[
i
]
=
av_frame_alloc
();
s
->
last_picture
[
i
]
=
av_frame_alloc
();
if
(
!
s
->
last_picture
[
i
])
goto
fail
;
}
}
s
->
mconly_picture
=
av_frame_alloc
();
s
->
mconly_picture
=
av_frame_alloc
();
s
->
current_picture
=
av_frame_alloc
();
s
->
current_picture
=
av_frame_alloc
();
if
(
!
s
->
mconly_picture
||
!
s
->
current_picture
)
goto
fail
;
return
0
;
return
0
;
fail
:
fail
:
...
...
libavcodec/snowenc.c
View file @
24b4e6c3
...
@@ -129,6 +129,8 @@ static av_cold int encode_init(AVCodecContext *avctx)
...
@@ -129,6 +129,8 @@ static av_cold int encode_init(AVCodecContext *avctx)
ff_set_cmp
(
&
s
->
dsp
,
s
->
dsp
.
me_sub_cmp
,
s
->
avctx
->
me_sub_cmp
);
ff_set_cmp
(
&
s
->
dsp
,
s
->
dsp
.
me_sub_cmp
,
s
->
avctx
->
me_sub_cmp
);
s
->
input_picture
=
av_frame_alloc
();
s
->
input_picture
=
av_frame_alloc
();
if
(
!
s
->
input_picture
)
return
AVERROR
(
ENOMEM
);
if
((
ret
=
ff_get_buffer
(
s
->
avctx
,
s
->
input_picture
,
AV_GET_BUFFER_FLAG_REF
))
<
0
)
if
((
ret
=
ff_get_buffer
(
s
->
avctx
,
s
->
input_picture
,
AV_GET_BUFFER_FLAG_REF
))
<
0
)
return
ret
;
return
ret
;
...
...
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