Commit e692b86a authored by Jean-Paul Saman's avatar Jean-Paul Saman

mmstu: handle keepalive error case

parent 2cb44954
......@@ -201,6 +201,11 @@ int MMSTUOpen( access_t *p_access )
/* Keep the connection alive when paused */
p_sys->p_keepalive = malloc( sizeof( mmstu_keepalive_t ) );
if( !p_sys->p_keepalive )
{
MMSTUClose ( p_access );
return VLC_ENOMEM;
}
p_sys->p_keepalive->p_access = p_access;
vlc_mutex_init( &p_sys->p_keepalive->lock );
vlc_cond_init( &p_sys->p_keepalive->wait );
......@@ -305,11 +310,14 @@ static int Control( access_t *p_access, int i_query, va_list args )
else
Seek( p_access, p_access->info.i_pos );
if( p_sys->p_keepalive )
{
vlc_mutex_lock( &p_sys->p_keepalive->lock );
p_sys->p_keepalive->b_paused = b_bool;
if( b_bool )
vlc_cond_signal( &p_sys->p_keepalive->wait );
vlc_mutex_unlock( &p_sys->p_keepalive->lock );
}
break;
case ACCESS_GET_TITLE_INFO:
......
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