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
8732eb12
Commit
8732eb12
authored
Oct 23, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_floodfill: better fix for crash
parent
1cdc8052
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
11 deletions
+16
-11
vf_floodfill.c
libavfilter/vf_floodfill.c
+16
-11
No files found.
libavfilter/vf_floodfill.c
View file @
8732eb12
...
...
@@ -35,6 +35,7 @@ typedef struct FloodfillContext {
int
x
,
y
;
int
s
[
4
];
int
S
[
4
];
int
d
[
4
];
int
nb_planes
;
...
...
@@ -293,26 +294,30 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
const
int
h
=
frame
->
height
;
int
i
,
ret
;
for
(
i
=
0
;
i
<
s
->
nb_planes
;
i
++
)
{
if
(
s
->
s
[
i
]
!=
s
->
d
[
i
])
break
;
}
if
(
i
==
s
->
nb_planes
)
goto
end
;
if
(
ret
=
av_frame_make_writable
(
frame
))
return
ret
;
if
(
is_inside
(
s
->
x
,
s
->
y
,
w
,
h
))
{
s
->
pick_pixel
(
frame
,
s
->
x
,
s
->
y
,
&
s0
,
&
s1
,
&
s2
,
&
s3
);
s
->
S
[
0
]
=
s0
;
s
->
S
[
1
]
=
s1
;
s
->
S
[
2
]
=
s2
;
s
->
S
[
3
]
=
s3
;
for
(
i
=
0
;
i
<
s
->
nb_planes
;
i
++
)
{
if
(
s
->
S
[
i
]
!=
s
->
d
[
i
])
break
;
}
if
(
i
==
s
->
nb_planes
)
goto
end
;
if
(
s
->
is_same
(
frame
,
s
->
x
,
s
->
y
,
s0
,
s1
,
s2
,
s3
))
{
s
->
points
[
s
->
front
].
x
=
s
->
x
;
s
->
points
[
s
->
front
].
y
=
s
->
y
;
s
->
front
++
;
}
if
(
ret
=
av_frame_make_writable
(
frame
))
return
ret
;
while
(
s
->
front
>
s
->
back
)
{
int
x
,
y
;
...
...
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