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
b99f1303
Commit
b99f1303
authored
Nov 29, 2012
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/concat: switch to filter_frame.
parent
ea3bad0e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
34 deletions
+2
-34
avf_concat.c
libavfilter/avf_concat.c
+2
-34
No files found.
libavfilter/avf_concat.c
View file @
b99f1303
...
...
@@ -178,16 +178,7 @@ static void push_frame(AVFilterContext *ctx, unsigned in_no,
in
->
pts
=
av_rescale
(
in
->
pts
,
in
->
nb_frames
,
in
->
nb_frames
-
1
);
buf
->
pts
+=
cat
->
delta_ts
;
switch
(
buf
->
type
)
{
case
AVMEDIA_TYPE_VIDEO
:
ff_start_frame
(
outlink
,
buf
);
ff_draw_slice
(
outlink
,
0
,
outlink
->
h
,
1
);
ff_end_frame
(
outlink
);
break
;
case
AVMEDIA_TYPE_AUDIO
:
ff_filter_frame
(
outlink
,
buf
);
break
;
}
ff_filter_frame
(
outlink
,
buf
);
}
static
void
process_frame
(
AVFilterLink
*
inlink
,
AVFilterBufferRef
*
buf
)
...
...
@@ -227,23 +218,6 @@ static AVFilterBufferRef *get_audio_buffer(AVFilterLink *inlink, int perms,
return
ff_get_audio_buffer
(
outlink
,
perms
,
nb_samples
);
}
static
int
start_frame
(
AVFilterLink
*
inlink
,
AVFilterBufferRef
*
buf
)
{
return
0
;
}
static
int
draw_slice
(
AVFilterLink
*
inlink
,
int
y
,
int
h
,
int
dir
)
{
return
0
;
}
static
int
end_frame
(
AVFilterLink
*
inlink
)
{
process_frame
(
inlink
,
inlink
->
cur_buf
);
inlink
->
cur_buf
=
NULL
;
return
0
;
}
static
int
filter_frame
(
AVFilterLink
*
inlink
,
AVFilterBufferRef
*
buf
)
{
process_frame
(
inlink
,
buf
);
...
...
@@ -389,16 +363,10 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
.
min_perms
=
AV_PERM_READ
|
AV_PERM_PRESERVE
,
.
get_video_buffer
=
get_video_buffer
,
.
get_audio_buffer
=
get_audio_buffer
,
.
filter_frame
=
filter_frame
,
};
snprintf
(
name
,
sizeof
(
name
),
"in%d:%c%d"
,
seg
,
"va"
[
type
],
str
);
pad
.
name
=
av_strdup
(
name
);
if
(
type
==
AVMEDIA_TYPE_VIDEO
)
{
pad
.
start_frame
=
start_frame
;
pad
.
draw_slice
=
draw_slice
;
pad
.
end_frame
=
end_frame
;
}
else
{
pad
.
filter_frame
=
filter_frame
;
}
ff_insert_inpad
(
ctx
,
ctx
->
nb_inputs
,
&
pad
);
}
}
...
...
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