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
38257d39
Commit
38257d39
authored
Mar 24, 2007
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gestures: Make sure p_intf->p_sys->p_input gets released.
parent
de20ea8f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
8 deletions
+25
-8
modules/control/gestures.c
modules/control/gestures.c
+25
-8
No files found.
modules/control/gestures.c
View file @
38257d39
...
@@ -66,6 +66,7 @@ struct intf_sys_t
...
@@ -66,6 +66,7 @@ struct intf_sys_t
int
E_
(
Open
)
(
vlc_object_t
*
);
int
E_
(
Open
)
(
vlc_object_t
*
);
void
E_
(
Close
)
(
vlc_object_t
*
);
void
E_
(
Close
)
(
vlc_object_t
*
);
static
int
InitThread
(
intf_thread_t
*
p_intf
);
static
int
InitThread
(
intf_thread_t
*
p_intf
);
static
void
EndThread
(
intf_thread_t
*
p_intf
);
static
int
MouseEvent
(
vlc_object_t
*
,
char
const
*
,
static
int
MouseEvent
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
vlc_value_t
,
vlc_value_t
,
void
*
);
...
@@ -246,14 +247,7 @@ static void RunIntf( intf_thread_t *p_intf )
...
@@ -246,14 +247,7 @@ static void RunIntf( intf_thread_t *p_intf )
msleep
(
INTF_IDLE_SLEEP
);
msleep
(
INTF_IDLE_SLEEP
);
}
}
if
(
p_intf
->
p_sys
->
p_vout
)
EndThread
(
p_intf
);
{
var_DelCallback
(
p_intf
->
p_sys
->
p_vout
,
"mouse-moved"
,
MouseEvent
,
p_intf
);
var_DelCallback
(
p_intf
->
p_sys
->
p_vout
,
"mouse-button-down"
,
MouseEvent
,
p_intf
);
vlc_object_release
(
p_intf
->
p_sys
->
p_vout
);
}
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -267,6 +261,9 @@ static int InitThread( intf_thread_t * p_intf )
...
@@ -267,6 +261,9 @@ static int InitThread( intf_thread_t * p_intf )
{
{
input_thread_t
*
p_input
;
input_thread_t
*
p_input
;
/* p_intf->p_sys->p_input references counting strategy:
* - InitThread is responsible for only one ref count retaining
* - EndThread is responsible for the correspondinf release */
p_input
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_INPUT
,
FIND_PARENT
);
p_input
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_INPUT
,
FIND_PARENT
);
vlc_mutex_lock
(
&
p_intf
->
change_lock
);
vlc_mutex_lock
(
&
p_intf
->
change_lock
);
...
@@ -302,6 +299,26 @@ static int InitThread( intf_thread_t * p_intf )
...
@@ -302,6 +299,26 @@ static int InitThread( intf_thread_t * p_intf )
}
}
}
}
/*****************************************************************************
* EndThread:
*****************************************************************************/
static
void
EndThread
(
intf_thread_t
*
p_intf
)
{
if
(
p_intf
->
p_sys
->
p_vout
)
{
var_DelCallback
(
p_intf
->
p_sys
->
p_vout
,
"mouse-moved"
,
MouseEvent
,
p_intf
);
var_DelCallback
(
p_intf
->
p_sys
->
p_vout
,
"mouse-button-down"
,
MouseEvent
,
p_intf
);
vlc_object_release
(
p_intf
->
p_sys
->
p_vout
);
}
if
(
p_intf
->
p_sys
->
p_input
)
{
vlc_object_release
(
p_intf
->
p_sys
->
p_input
);
}
}
/*****************************************************************************
/*****************************************************************************
* MouseEvent: callback for mouse events
* MouseEvent: callback for mouse events
*****************************************************************************/
*****************************************************************************/
...
...
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