Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
a8595578
Commit
a8595578
authored
May 19, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Marquee: thread-safety corner cases
parent
bb6c6009
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
modules/video_filter/marq.c
modules/video_filter/marq.c
+10
-8
No files found.
modules/video_filter/marq.c
View file @
a8595578
...
...
@@ -210,27 +210,30 @@ static int CreateFilter( vlc_object_t *p_this )
config_ChainParse
(
p_filter
,
CFG_PREFIX
,
ppsz_filter_options
,
p_filter
->
p_cfg
);
#define CREATE_VAR( stor, type, var ) \
p_sys->stor = var_CreateGet##type##Command( p_filter, var ); \
var_AddCallback( p_filter, var, MarqueeCallback, p_sys );
p_sys
->
b_need_update
=
true
;
CREATE_VAR
(
i_xoff
,
Integer
,
"marq-x"
);
CREATE_VAR
(
i_yoff
,
Integer
,
"marq-y"
);
CREATE_VAR
(
i_timeout
,
Integer
,
"marq-timeout"
);
CREATE_VAR
(
i_refresh
,
Integer
,
"marq-refresh"
);
p_sys
->
i_refresh
*=
1000
;
p_sys
->
i_refresh
=
1000
*
var_CreateGetIntegerCommand
(
p_filter
,
"marq-refresh"
);
var_AddCallback
(
p_filter
,
"marq-refresh"
,
MarqueeCallback
,
p_sys
);
CREATE_VAR
(
i_pos
,
Integer
,
"marq-position"
);
CREATE_VAR
(
psz_marquee
,
String
,
"marq-marquee"
);
CREATE_VAR
(
p_style
->
i_font_alpha
,
Integer
,
"marq-opacity"
);
p_sys
->
p_style
->
i_font_alpha
=
255
-
var_CreateGetIntegerCommand
(
p_filter
,
"marq-opacity"
);
var_AddCallback
(
p_filter
,
"marq-opacity"
,
MarqueeCallback
,
p_sys
);
CREATE_VAR
(
p_style
->
i_font_color
,
Integer
,
"marq-color"
);
CREATE_VAR
(
p_style
->
i_font_size
,
Integer
,
"marq-size"
);
p_sys
->
p_style
->
i_font_alpha
=
255
-
p_sys
->
p_style
->
i_font_alpha
;
/* Misc init */
p_filter
->
pf_sub_filter
=
Filter
;
p_sys
->
last_time
=
0
;
p_sys
->
b_need_update
=
true
;
return
VLC_SUCCESS
;
}
...
...
@@ -242,9 +245,6 @@ static void DestroyFilter( vlc_object_t *p_this )
filter_t
*
p_filter
=
(
filter_t
*
)
p_this
;
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
free
(
p_sys
->
p_style
);
free
(
p_sys
->
psz_marquee
);
/* Delete the marquee variables */
#define DEL_VAR(var) \
var_DelCallback( p_filter, var, MarqueeCallback, p_sys ); \
...
...
@@ -259,6 +259,8 @@ static void DestroyFilter( vlc_object_t *p_this )
DEL_VAR
(
"marq-size"
);
vlc_mutex_destroy
(
&
p_sys
->
lock
);
free
(
p_sys
->
p_style
);
free
(
p_sys
->
psz_marquee
);
free
(
p_sys
);
}
...
...
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