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
a3304302
Commit
a3304302
authored
Nov 26, 2015
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_stack: make it possible to stop with shortest stream
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
9078a694
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
filters.texi
doc/filters.texi
+8
-0
vf_stack.c
libavfilter/vf_stack.c
+3
-1
No files found.
doc/filters.texi
View file @
a3304302
...
...
@@ -7154,6 +7154,10 @@ The filter accept the following option:
@table @option
@item inputs
Set number of input streams. Default is 2.
@item shortest
If set to 1, force the output to terminate when the shortest input
terminates. Default value is 0.
@end table
@section hue
...
...
@@ -11598,6 +11602,10 @@ The filter accept the following option:
@table @option
@item inputs
Set number of input streams. Default is 2.
@item shortest
If set to 1, force the output to terminate when the shortest input
terminates. Default value is 0.
@end table
@section w3fdif
...
...
libavfilter/vf_stack.c
View file @
a3304302
...
...
@@ -33,6 +33,7 @@ typedef struct StackContext {
const
AVClass
*
class
;
const
AVPixFmtDescriptor
*
desc
;
int
nb_inputs
;
int
shortest
;
int
is_vertical
;
int
nb_planes
;
...
...
@@ -199,7 +200,7 @@ static int config_output(AVFilterLink *outlink)
in
[
i
].
time_base
=
inlink
->
time_base
;
in
[
i
].
sync
=
1
;
in
[
i
].
before
=
EXT_STOP
;
in
[
i
].
after
=
EXT_INFINITY
;
in
[
i
].
after
=
s
->
shortest
?
EXT_STOP
:
EXT_INFINITY
;
}
return
ff_framesync_configure
(
&
s
->
fs
);
...
...
@@ -222,6 +223,7 @@ static av_cold void uninit(AVFilterContext *ctx)
#define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM
static
const
AVOption
stack_options
[]
=
{
{
"inputs"
,
"set number of inputs"
,
OFFSET
(
nb_inputs
),
AV_OPT_TYPE_INT
,
{.
i64
=
2
},
2
,
INT_MAX
,
.
flags
=
FLAGS
},
{
"shortest"
,
"force termination when the shortest input terminates"
,
OFFSET
(
shortest
),
AV_OPT_TYPE_BOOL
,
{.
i64
=
0
},
0
,
1
,
.
flags
=
FLAGS
},
{
NULL
},
};
...
...
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