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
031d6448
Commit
031d6448
authored
Nov 29, 2012
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/ass: switch to filter_frame.
parent
9178235f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
11 deletions
+4
-11
vf_ass.c
libavfilter/vf_ass.c
+4
-11
No files found.
libavfilter/vf_ass.c
View file @
031d6448
...
...
@@ -157,8 +157,6 @@ static int config_input(AVFilterLink *inlink)
return
0
;
}
static
int
null_draw_slice
(
AVFilterLink
*
link
,
int
y
,
int
h
,
int
slice_dir
)
{
return
0
;
}
/* libass stores an RGBA color in the format RRGGBBTT, where TT is the transparency level */
#define AR(c) ( (c)>>24)
#define AG(c) (((c)>>16)&0xFF)
...
...
@@ -180,12 +178,11 @@ static void overlay_ass_image(AssContext *ass, AVFilterBufferRef *picref,
}
}
static
int
end_frame
(
AVFilterLink
*
inlink
)
static
int
filter_frame
(
AVFilterLink
*
inlink
,
AVFilterBufferRef
*
picref
)
{
AVFilterContext
*
ctx
=
inlink
->
dst
;
AVFilterLink
*
outlink
=
ctx
->
outputs
[
0
];
AssContext
*
ass
=
ctx
->
priv
;
AVFilterBufferRef
*
picref
=
inlink
->
cur_buf
;
int
detect_change
=
0
;
double
time_ms
=
picref
->
pts
*
av_q2d
(
inlink
->
time_base
)
*
1000
;
ASS_Image
*
image
=
ass_render_frame
(
ass
->
renderer
,
ass
->
track
,
...
...
@@ -196,20 +193,16 @@ static int end_frame(AVFilterLink *inlink)
overlay_ass_image
(
ass
,
picref
,
image
);
ff_draw_slice
(
outlink
,
0
,
picref
->
video
->
h
,
1
);
return
ff_end_frame
(
outlink
);
return
ff_filter_frame
(
outlink
,
picref
);
}
static
const
AVFilterPad
ass_inputs
[]
=
{
{
.
name
=
"default"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
get_video_buffer
=
ff_null_get_video_buffer
,
.
start_frame
=
ff_null_start_frame
,
.
draw_slice
=
null_draw_slice
,
.
end_frame
=
end_frame
,
.
filter_frame
=
filter_frame
,
.
config_props
=
config_input
,
.
min_perms
=
AV_PERM_
WRITE
|
AV_PERM_READ
,
.
min_perms
=
AV_PERM_
READ
|
AV_PERM_WRITE
,
},
{
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