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
ed1c8350
Commit
ed1c8350
authored
May 26, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/trim: remove request frame hack
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
4f8e4b8a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
20 deletions
+4
-20
trim.c
libavfilter/trim.c
+4
-20
No files found.
libavfilter/trim.c
View file @
ed1c8350
...
...
@@ -69,7 +69,6 @@ typedef struct TrimContext {
int64_t
next_pts
;
int
eof
;
int
got_output
;
}
TrimContext
;
static
int
init
(
AVFilterContext
*
ctx
)
...
...
@@ -104,22 +103,9 @@ static int config_input(AVFilterLink *inlink)
return
0
;
}
static
int
request_frame
(
AVFilterLink
*
outlink
)
static
int
config_output
(
AVFilterLink
*
outlink
)
{
AVFilterContext
*
ctx
=
outlink
->
src
;
TrimContext
*
s
=
ctx
->
priv
;
int
ret
;
s
->
got_output
=
0
;
while
(
!
s
->
got_output
)
{
if
(
s
->
eof
)
return
AVERROR_EOF
;
ret
=
ff_request_frame
(
ctx
->
inputs
[
0
]);
if
(
ret
<
0
)
return
ret
;
}
outlink
->
flags
|=
FF_LINK_FLAG_REQUEST_LOOP
;
return
0
;
}
...
...
@@ -182,7 +168,6 @@ static int trim_filter_frame(AVFilterLink *inlink, AVFrame *frame)
}
s
->
nb_frames
++
;
s
->
got_output
=
1
;
return
ff_filter_frame
(
ctx
->
outputs
[
0
],
frame
);
...
...
@@ -224,7 +209,7 @@ static const AVFilterPad trim_outputs[] = {
{
.
name
=
"default"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
request_frame
=
request_frame
,
.
config_props
=
config_output
,
},
{
NULL
}
};
...
...
@@ -346,7 +331,6 @@ static int atrim_filter_frame(AVFilterLink *inlink, AVFrame *frame)
}
else
frame
->
nb_samples
=
end_sample
;
s
->
got_output
=
1
;
return
ff_filter_frame
(
ctx
->
outputs
[
0
],
frame
);
drop:
...
...
@@ -387,7 +371,7 @@ static const AVFilterPad atrim_outputs[] = {
{
.
name
=
"default"
,
.
type
=
AVMEDIA_TYPE_AUDIO
,
.
request_frame
=
request_frame
,
.
config_props
=
config_output
,
},
{
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