Commit fc5b6ff9 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

remoteosd: close connection immediately if picture allocation fails

parent f332147f
......@@ -587,14 +587,19 @@ static void* vnc_worker_thread( void *obj )
}
/* Create an empty picture for VNC the data */
picture_t *pic = picture_New( VLC_CODEC_YUVA, p_sys->i_vnc_width,
p_sys->i_vnc_height, 1, 1 );
if( likely(pic != NULL) )
{
vlc_mutex_lock( &p_sys->lock );
p_sys->i_socket = fd;
p_sys->p_pic = picture_New( VLC_CODEC_YUVA,
p_sys->i_vnc_width, p_sys->i_vnc_height, 1, 1 );
p_sys->p_pic = pic;
vlc_mutex_unlock( &p_sys->lock );
if( !p_sys->p_pic )
}
else
{
goto exit;
net_Close( fd );
return NULL;
}
write_update_request( p_filter, false );
......@@ -671,8 +676,6 @@ static void* vnc_worker_thread( void *obj )
vlc_join( update_request_thread_handle, NULL );
}
exit:
msg_Dbg( p_filter, "VNC message reader thread ended" );
vlc_restorecancel (canc);
return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment