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
2e5af443
Commit
2e5af443
authored
Dec 22, 2016
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi: pass min explicitly to samples_ready().
parent
e7e4c8df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
avfilter.c
libavfilter/avfilter.c
+4
-4
No files found.
libavfilter/avfilter.c
View file @
2e5af443
...
@@ -1178,10 +1178,10 @@ error:
...
@@ -1178,10 +1178,10 @@ error:
return
AVERROR_PATCHWELCOME
;
return
AVERROR_PATCHWELCOME
;
}
}
static
int
samples_ready
(
AVFilterLink
*
link
)
static
int
samples_ready
(
AVFilterLink
*
link
,
unsigned
min
)
{
{
return
ff_framequeue_queued_frames
(
&
link
->
fifo
)
&&
return
ff_framequeue_queued_frames
(
&
link
->
fifo
)
&&
(
ff_framequeue_queued_samples
(
&
link
->
fifo
)
>=
link
->
min_samples
||
(
ff_framequeue_queued_samples
(
&
link
->
fifo
)
>=
min
||
link
->
status_in
);
link
->
status_in
);
}
}
...
@@ -1194,7 +1194,7 @@ static int take_samples(AVFilterLink *link, unsigned min, unsigned max,
...
@@ -1194,7 +1194,7 @@ static int take_samples(AVFilterLink *link, unsigned min, unsigned max,
/* Note: this function relies on no format changes and must only be
/* Note: this function relies on no format changes and must only be
called with enough samples. */
called with enough samples. */
av_assert1
(
samples_ready
(
link
));
av_assert1
(
samples_ready
(
link
,
link
->
min_samples
));
frame0
=
frame
=
ff_framequeue_peek
(
&
link
->
fifo
,
0
);
frame0
=
frame
=
ff_framequeue_peek
(
&
link
->
fifo
,
0
);
if
(
frame
->
nb_samples
>=
min
&&
frame
->
nb_samples
<
max
)
{
if
(
frame
->
nb_samples
>=
min
&&
frame
->
nb_samples
<
max
)
{
*
rframe
=
ff_framequeue_take
(
&
link
->
fifo
);
*
rframe
=
ff_framequeue_take
(
&
link
->
fifo
);
...
@@ -1321,7 +1321,7 @@ static int ff_filter_activate_default(AVFilterContext *filter)
...
@@ -1321,7 +1321,7 @@ static int ff_filter_activate_default(AVFilterContext *filter)
unsigned
i
;
unsigned
i
;
for
(
i
=
0
;
i
<
filter
->
nb_inputs
;
i
++
)
{
for
(
i
=
0
;
i
<
filter
->
nb_inputs
;
i
++
)
{
if
(
samples_ready
(
filter
->
inputs
[
i
]))
{
if
(
samples_ready
(
filter
->
inputs
[
i
]
,
filter
->
inputs
[
i
]
->
min_samples
))
{
return
ff_filter_frame_to_filter
(
filter
->
inputs
[
i
]);
return
ff_filter_frame_to_filter
(
filter
->
inputs
[
i
]);
}
}
}
}
...
...
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