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
a9cfe656
Commit
a9cfe656
authored
Aug 20, 2012
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/split: handle closed outputs.
Return AVERROR_EOF if all outputs are closed.
parent
8b61abac
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
split.c
libavfilter/split.c
+12
-4
No files found.
libavfilter/split.c
View file @
a9cfe656
...
...
@@ -71,10 +71,14 @@ static void split_uninit(AVFilterContext *ctx)
static
int
start_frame
(
AVFilterLink
*
inlink
,
AVFilterBufferRef
*
picref
)
{
AVFilterContext
*
ctx
=
inlink
->
dst
;
int
i
,
ret
=
0
;
int
i
,
ret
=
AVERROR_EOF
;
for
(
i
=
0
;
i
<
ctx
->
nb_outputs
;
i
++
)
{
AVFilterBufferRef
*
buf_out
=
avfilter_ref_buffer
(
picref
,
~
AV_PERM_WRITE
);
AVFilterBufferRef
*
buf_out
;
if
(
ctx
->
outputs
[
i
]
->
closed
)
continue
;
buf_out
=
avfilter_ref_buffer
(
picref
,
~
AV_PERM_WRITE
);
if
(
!
buf_out
)
return
AVERROR
(
ENOMEM
);
...
...
@@ -88,9 +92,11 @@ static int start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref)
static
int
draw_slice
(
AVFilterLink
*
inlink
,
int
y
,
int
h
,
int
slice_dir
)
{
AVFilterContext
*
ctx
=
inlink
->
dst
;
int
i
,
ret
=
0
;
int
i
,
ret
=
AVERROR_EOF
;
for
(
i
=
0
;
i
<
ctx
->
nb_outputs
;
i
++
)
{
if
(
ctx
->
outputs
[
i
]
->
closed
)
continue
;
ret
=
ff_draw_slice
(
ctx
->
outputs
[
i
],
y
,
h
,
slice_dir
);
if
(
ret
<
0
)
break
;
...
...
@@ -101,9 +107,11 @@ static int draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
static
int
end_frame
(
AVFilterLink
*
inlink
)
{
AVFilterContext
*
ctx
=
inlink
->
dst
;
int
i
,
ret
=
0
;
int
i
,
ret
=
AVERROR_EOF
;
for
(
i
=
0
;
i
<
ctx
->
nb_outputs
;
i
++
)
{
if
(
ctx
->
outputs
[
i
]
->
closed
)
continue
;
ret
=
ff_end_frame
(
ctx
->
outputs
[
i
]);
if
(
ret
<
0
)
break
;
...
...
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