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
d38c173d
Commit
d38c173d
authored
Mar 31, 2013
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/af_atempo: simplify request_frame loop.
parent
b570f24d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
af_atempo.c
libavfilter/af_atempo.c
+3
-8
No files found.
libavfilter/af_atempo.c
View file @
d38c173d
...
@@ -139,7 +139,6 @@ typedef struct {
...
@@ -139,7 +139,6 @@ typedef struct {
FFTSample
*
correlation
;
FFTSample
*
correlation
;
// for managing AVFilterPad.request_frame and AVFilterPad.filter_frame
// for managing AVFilterPad.request_frame and AVFilterPad.filter_frame
int
request_fulfilled
;
AVFrame
*
dst_buffer
;
AVFrame
*
dst_buffer
;
uint8_t
*
dst
;
uint8_t
*
dst
;
uint8_t
*
dst_end
;
uint8_t
*
dst_end
;
...
@@ -181,7 +180,6 @@ static void yae_clear(ATempoContext *atempo)
...
@@ -181,7 +180,6 @@ static void yae_clear(ATempoContext *atempo)
atempo
->
dst
=
NULL
;
atempo
->
dst
=
NULL
;
atempo
->
dst_end
=
NULL
;
atempo
->
dst_end
=
NULL
;
atempo
->
request_fulfilled
=
0
;
atempo
->
nsamples_in
=
0
;
atempo
->
nsamples_in
=
0
;
atempo
->
nsamples_out
=
0
;
atempo
->
nsamples_out
=
0
;
}
}
...
@@ -1017,6 +1015,8 @@ static int config_props(AVFilterLink *inlink)
...
@@ -1017,6 +1015,8 @@ static int config_props(AVFilterLink *inlink)
int
sample_rate
=
(
int
)
inlink
->
sample_rate
;
int
sample_rate
=
(
int
)
inlink
->
sample_rate
;
int
channels
=
av_get_channel_layout_nb_channels
(
inlink
->
channel_layout
);
int
channels
=
av_get_channel_layout_nb_channels
(
inlink
->
channel_layout
);
ctx
->
outputs
[
0
]
->
flags
|=
FF_LINK_FLAG_REQUEST_LOOP
;
return
yae_reset
(
atempo
,
format
,
sample_rate
,
channels
);
return
yae_reset
(
atempo
,
format
,
sample_rate
,
channels
);
}
}
...
@@ -1074,7 +1074,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *src_buffer)
...
@@ -1074,7 +1074,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *src_buffer)
ret
=
push_samples
(
atempo
,
outlink
,
n_out
);
ret
=
push_samples
(
atempo
,
outlink
,
n_out
);
if
(
ret
<
0
)
if
(
ret
<
0
)
goto
end
;
goto
end
;
atempo
->
request_fulfilled
=
1
;
}
}
}
}
...
@@ -1090,11 +1089,7 @@ static int request_frame(AVFilterLink *outlink)
...
@@ -1090,11 +1089,7 @@ static int request_frame(AVFilterLink *outlink)
ATempoContext
*
atempo
=
ctx
->
priv
;
ATempoContext
*
atempo
=
ctx
->
priv
;
int
ret
;
int
ret
;
atempo
->
request_fulfilled
=
0
;
ret
=
ff_request_frame
(
ctx
->
inputs
[
0
]);
do
{
ret
=
ff_request_frame
(
ctx
->
inputs
[
0
]);
}
while
(
!
atempo
->
request_fulfilled
&&
ret
>=
0
);
if
(
ret
==
AVERROR_EOF
)
{
if
(
ret
==
AVERROR_EOF
)
{
// flush the filter:
// flush the filter:
...
...
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