Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
4838f128
Commit
4838f128
authored
Feb 27, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
control/media_instance.c: Sanitize input_thread_t management.
parent
2209f299
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
src/control/media_instance.c
src/control/media_instance.c
+8
-8
No files found.
src/control/media_instance.c
View file @
4838f128
...
@@ -78,11 +78,6 @@ static void release_input_thread( libvlc_media_instance_t *p_mi )
...
@@ -78,11 +78,6 @@ static void release_input_thread( libvlc_media_instance_t *p_mi )
if
(
!
p_input_thread
)
if
(
!
p_input_thread
)
return
;
return
;
/* release for previous vlc_object_get */
vlc_object_release
(
p_input_thread
);
/* release for initial p_input_thread yield (see _new()) */
vlc_object_release
(
p_input_thread
);
/* No one is tracking this input_thread appart us. Destroy it */
/* No one is tracking this input_thread appart us. Destroy it */
if
(
p_mi
->
b_own_its_input_thread
)
if
(
p_mi
->
b_own_its_input_thread
)
...
@@ -92,10 +87,11 @@ static void release_input_thread( libvlc_media_instance_t *p_mi )
...
@@ -92,10 +87,11 @@ static void release_input_thread( libvlc_media_instance_t *p_mi )
var_DelCallback
(
p_input_thread
,
"pausable"
,
input_state_changed
,
p_mi
);
var_DelCallback
(
p_input_thread
,
"pausable"
,
input_state_changed
,
p_mi
);
var_DelCallback
(
p_input_thread
,
"intf-change"
,
input_position_changed
,
p_mi
);
var_DelCallback
(
p_input_thread
,
"intf-change"
,
input_position_changed
,
p_mi
);
var_DelCallback
(
p_input_thread
,
"intf-change"
,
input_time_changed
,
p_mi
);
var_DelCallback
(
p_input_thread
,
"intf-change"
,
input_time_changed
,
p_mi
);
/* We owned this one */
/* We owned this one */
input_StopThread
(
p_input_thread
);
input_StopThread
(
p_input_thread
);
var_Destroy
(
p_input_thread
,
"drawable"
);
var_Destroy
(
p_input_thread
,
"drawable"
);
//input_DestroyThread( p_input_thread );
}
}
else
else
{
{
...
@@ -105,6 +101,8 @@ static void release_input_thread( libvlc_media_instance_t *p_mi )
...
@@ -105,6 +101,8 @@ static void release_input_thread( libvlc_media_instance_t *p_mi )
vlc_object_release
(
p_input_thread
);
vlc_object_release
(
p_input_thread
);
}
}
/* release for previous vlc_object_get */
vlc_object_release
(
p_input_thread
);
}
}
/*
/*
...
@@ -536,9 +534,8 @@ void libvlc_media_instance_play( libvlc_media_instance_t *p_mi,
...
@@ -536,9 +534,8 @@ void libvlc_media_instance_play( libvlc_media_instance_t *p_mi,
}
}
p_mi
->
i_input_id
=
input_Read
(
p_mi
->
p_libvlc_instance
->
p_libvlc_int
,
p_mi
->
i_input_id
=
input_Read
(
p_mi
->
p_libvlc_instance
->
p_libvlc_int
,
p_mi
->
p_md
->
p_input_item
,
VLC_FALSE
);
p_mi
->
p_md
->
p_input_item
,
VLC_FALSE
);
/* Released in _release() */
p_input_thread
=
(
input_thread_t
*
)
vlc_object_get
(
p_mi
->
i_input_id
);
p_input_thread
=
(
input_thread_t
*
)
vlc_object_get
(
p_mi
->
i_input_id
);
if
(
!
p_input_thread
)
if
(
!
p_input_thread
)
...
@@ -560,6 +557,7 @@ void libvlc_media_instance_play( libvlc_media_instance_t *p_mi,
...
@@ -560,6 +557,7 @@ void libvlc_media_instance_play( libvlc_media_instance_t *p_mi,
var_AddCallback
(
p_input_thread
,
"intf-change"
,
input_position_changed
,
p_mi
);
var_AddCallback
(
p_input_thread
,
"intf-change"
,
input_position_changed
,
p_mi
);
var_AddCallback
(
p_input_thread
,
"intf-change"
,
input_time_changed
,
p_mi
);
var_AddCallback
(
p_input_thread
,
"intf-change"
,
input_time_changed
,
p_mi
);
vlc_object_release
(
p_input_thread
);
vlc_mutex_unlock
(
&
p_mi
->
object_lock
);
vlc_mutex_unlock
(
&
p_mi
->
object_lock
);
}
}
...
@@ -616,6 +614,7 @@ void libvlc_media_instance_set_drawable( libvlc_media_instance_t *p_mi,
...
@@ -616,6 +614,7 @@ void libvlc_media_instance_set_drawable( libvlc_media_instance_t *p_mi,
libvlc_drawable_t
drawable
,
libvlc_drawable_t
drawable
,
libvlc_exception_t
*
p_e
)
libvlc_exception_t
*
p_e
)
{
{
(
void
)
p_e
;
p_mi
->
drawable
=
drawable
;
p_mi
->
drawable
=
drawable
;
}
}
...
@@ -625,6 +624,7 @@ void libvlc_media_instance_set_drawable( libvlc_media_instance_t *p_mi,
...
@@ -625,6 +624,7 @@ void libvlc_media_instance_set_drawable( libvlc_media_instance_t *p_mi,
libvlc_drawable_t
libvlc_drawable_t
libvlc_media_instance_get_drawable
(
libvlc_media_instance_t
*
p_mi
,
libvlc_exception_t
*
p_e
)
libvlc_media_instance_get_drawable
(
libvlc_media_instance_t
*
p_mi
,
libvlc_exception_t
*
p_e
)
{
{
(
void
)
p_e
;
return
p_mi
->
drawable
;
return
p_mi
->
drawable
;
}
}
...
...
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