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
80daa247
Commit
80daa247
authored
Sep 23, 2011
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vf_drawtext: do not reset "n" variable to 0 in case the filter is reinited
parent
01fbcc6f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
vf_drawtext.c
libavfilter/vf_drawtext.c
+6
-1
No files found.
libavfilter/vf_drawtext.c
View file @
80daa247
...
...
@@ -96,6 +96,7 @@ enum var_name {
typedef
struct
{
const
AVClass
*
class
;
int
reinit
;
///< tells if the filter is being reinited
uint8_t
*
fontfile
;
///< font to be used
uint8_t
*
text
;
///< text to be drawn
uint8_t
*
expanded_text
;
///< used to contain the strftime()-expanded text
...
...
@@ -469,7 +470,8 @@ static int config_input(AVFilterLink *inlink)
dtext
->
var_values
[
VAR_VSUB
]
=
1
<<
pix_desc
->
log2_chroma_h
;
dtext
->
var_values
[
VAR_X
]
=
NAN
;
dtext
->
var_values
[
VAR_Y
]
=
NAN
;
dtext
->
var_values
[
VAR_N
]
=
0
;
if
(
!
dtext
->
reinit
)
dtext
->
var_values
[
VAR_N
]
=
0
;
dtext
->
var_values
[
VAR_T
]
=
NAN
;
if
((
ret
=
av_expr_parse
(
&
dtext
->
x_pexpr
,
dtext
->
x_expr
,
var_names
,
...
...
@@ -483,9 +485,12 @@ static int config_input(AVFilterLink *inlink)
static
int
command
(
AVFilterContext
*
ctx
,
const
char
*
cmd
,
const
char
*
arg
,
char
*
res
,
int
res_len
,
int
flags
)
{
DrawTextContext
*
dtext
=
ctx
->
priv
;
if
(
!
strcmp
(
cmd
,
"reinit"
)){
int
ret
;
uninit
(
ctx
);
dtext
->
reinit
=
1
;
if
((
ret
=
init
(
ctx
,
arg
,
NULL
))
<
0
)
return
ret
;
return
config_input
(
ctx
->
inputs
[
0
]);
...
...
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