Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
4582e4c0
Commit
4582e4c0
authored
May 06, 2013
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi: add comments to explain the negotiation loop.
parent
78d16b6a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
avfiltergraph.c
libavfilter/avfiltergraph.c
+19
-2
No files found.
libavfilter/avfiltergraph.c
View file @
4582e4c0
...
...
@@ -316,12 +316,24 @@ static int formats_declared(AVFilterContext *f)
return
1
;
}
/**
* Perform one round of query_formats() and merging formats lists on the
* filter graph.
* @return >=0 if all links formats lists could be queried and merged;
* AVERROR(EAGAIN) some progress was made in the queries or merging
* and a later call may succeed;
* AVERROR(EIO) (may be changed) plus a log message if no progress
* was made and the negotiation is stuck;
* a negative error code if some other error happened
*/
static
int
query_formats
(
AVFilterGraph
*
graph
,
AVClass
*
log_ctx
)
{
int
i
,
j
,
ret
;
int
scaler_count
=
0
,
resampler_count
=
0
;
int
count_queried
=
0
,
count_merged
=
0
,
count_already_merged
=
0
,
count_delayed
=
0
;
int
count_queried
=
0
;
/* successful calls to query_formats() */
int
count_merged
=
0
;
/* successful merge of formats lists */
int
count_already_merged
=
0
;
/* lists already merged */
int
count_delayed
=
0
;
/* lists that need to be merged later */
for
(
i
=
0
;
i
<
graph
->
nb_filters
;
i
++
)
{
AVFilterContext
*
f
=
graph
->
filters
[
i
];
...
...
@@ -464,6 +476,11 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx)
if
(
count_delayed
)
{
AVBPrint
bp
;
/* if count_queried > 0, one filter at least did set its formats,
that will give additional information to its neighbour;
if count_merged > 0, one pair of formats lists at least was merged,
that will give additional information to all connected filters;
in both cases, progress was made and a new round must be done */
if
(
count_queried
||
count_merged
)
return
AVERROR
(
EAGAIN
);
av_bprint_init
(
&
bp
,
0
,
AV_BPRINT_SIZE_AUTOMATIC
);
...
...
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