Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
36eb6ac9
Commit
36eb6ac9
authored
Jun 25, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
postproc: fix potential crash (var_DelCallback missing and callback added too
early).
parent
1f8124f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
modules/video_filter/postproc.c
modules/video_filter/postproc.c
+10
-4
No files found.
modules/video_filter/postproc.c
View file @
36eb6ac9
...
...
@@ -195,7 +195,6 @@ static int OpenPostproc( vlc_object_t *p_this )
/* For some obscure reason the VLC_VAR_ISCOMMAND isn't taken into account
in during var_Create */
var_Change
(
p_filter
,
FILTER_PREFIX
"q"
,
VLC_VAR_SETISCOMMAND
,
NULL
,
NULL
);
var_AddCallback
(
p_filter
,
FILTER_PREFIX
"q"
,
PPQCallback
,
NULL
);
text
.
psz_string
=
_
(
"Post processing"
);
var_Change
(
p_filter
,
FILTER_PREFIX
"q"
,
VLC_VAR_SETTEXT
,
&
text
,
NULL
);
...
...
@@ -205,7 +204,6 @@ static int OpenPostproc( vlc_object_t *p_this )
val
.
psz_string
=
var_CreateGetNonEmptyStringCommand
(
p_filter
,
FILTER_PREFIX
"name"
);
var_AddCallback
(
p_filter
,
FILTER_PREFIX
"name"
,
PPNameCallback
,
NULL
);
if
(
val_orig
.
i_int
)
{
p_sys
->
pp_mode
=
pp_get_mode_by_name_and_quality
(
val
.
psz_string
?
...
...
@@ -250,7 +248,11 @@ static int OpenPostproc( vlc_object_t *p_this )
&
val
,
text
.
psz_string
?&
text
:
NULL
);
}
vlc_mutex_init
(
&
p_sys
->
lock
);
/* FIXME: too late w.r.t. callback */
vlc_mutex_init
(
&
p_sys
->
lock
);
/* Add the callback at the end to prevent crashes */
var_AddCallback
(
p_filter
,
FILTER_PREFIX
"q"
,
PPQCallback
,
NULL
);
var_AddCallback
(
p_filter
,
FILTER_PREFIX
"name"
,
PPNameCallback
,
NULL
);
p_filter
->
pf_video_filter
=
PostprocPict
;
p_sys
->
b_had_matrix
=
true
;
...
...
@@ -266,7 +268,11 @@ static void ClosePostproc( vlc_object_t *p_this )
filter_t
*
p_filter
=
(
filter_t
*
)
p_this
;
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
/* FIXME: delete callbacks before mutex */
/* delete the callback before destroying the mutex */
var_DelCallback
(
p_filter
,
FILTER_PREFIX
"q"
,
PPQCallback
,
NULL
);
var_DelCallback
(
p_filter
,
FILTER_PREFIX
"name"
,
PPNameCallback
,
NULL
);
/* Destroy the resources */
vlc_mutex_destroy
(
&
p_sys
->
lock
);
pp_free_context
(
p_sys
->
pp_context
);
if
(
p_sys
->
pp_mode
)
pp_free_mode
(
p_sys
->
pp_mode
);
...
...
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