[vlc-devel] [PATCH 3/4] chromecast: Disable message thread cancellation
Hugo Beauzée-Luyssen
hugo at beauzee.fr
Thu Mar 2 10:46:47 CET 2017
We do not cancel it, and the code isn't cancellation safe.
---
modules/stream_out/chromecast/chromecast_ctrl.cpp | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index b76a554d17..94bf6f7dc7 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -163,9 +163,7 @@ void intf_sys_t::setHasInput( const std::string mime_type )
this->m_mime = mime_type;
- mutex_cleanup_push(&m_lock);
waitAppStarted();
- vlc_cleanup_pop();
if ( m_state == Dead )
{
msg_Warn( m_module, "no Chromecast hook possible");
@@ -222,6 +220,7 @@ void* intf_sys_t::ChromecastThread(void* p_data)
void intf_sys_t::mainLoop()
{
+ vlc_savecancel();
vlc_interrupt_set( m_ctl_thread_interrupt );
// State was already initialized as Authenticating
@@ -671,7 +670,6 @@ void intf_sys_t::waitSeekDone()
vlc_mutex_locker locker(&m_lock);
if ( m_seek_request_time != VLC_TS_INVALID )
{
- mutex_cleanup_push(&m_lock);
while ( m_state == Seeking )
{
#ifndef NDEBUG
@@ -682,7 +680,6 @@ void intf_sys_t::waitSeekDone()
msg_Dbg( m_module, "finished waiting for Chromecast seek" );
#endif
}
- vlc_cleanup_pop();
m_seek_request_time = VLC_TS_INVALID;
}
}
@@ -773,9 +770,7 @@ void intf_sys_t::wait_app_started(void *pt)
{
intf_sys_t *p_this = reinterpret_cast<intf_sys_t*>(pt);
vlc_mutex_locker locker( &p_this->m_lock);
- mutex_cleanup_push( &p_this->m_lock );
p_this->waitAppStarted();
- vlc_cleanup_pop();
}
void intf_sys_t::request_seek(void *pt, mtime_t pos)
--
2.11.0
More information about the vlc-devel
mailing list