Commit d42739f8 authored by Clément Stenac's avatar Clément Stenac

Fix interaction locking

parent 1b481ca9
...@@ -143,7 +143,8 @@ protected: ...@@ -143,7 +143,8 @@ protected:
{ {
QSettings settings( "VideoLAN", "VLC" ); QSettings settings( "VideoLAN", "VLC" );
settings.beginGroup( name ); settings.beginGroup( name );
resize( settings.value( "size", defSize ).toSize() ); QSize s = settings.value( "size", defSize ).toSize() ;
fprintf( stderr, "%i %i ", s.width(), s.height() );
move( settings.value( "pos", QPoint( 0,0 ) ).toPoint() ); move( settings.value( "pos", QPoint( 0,0 ) ).toPoint() );
settings.endGroup(); settings.endGroup();
} }
......
...@@ -217,7 +217,7 @@ int __intf_UserWarn( vlc_object_t *p_this, ...@@ -217,7 +217,7 @@ int __intf_UserWarn( vlc_object_t *p_this,
{ {
va_list args; va_list args;
DIALOG_INIT( ONEWAY ); DIALOG_INIT( ONEWAY );
p_new->psz_title = strdup( psz_title ); p_new->psz_title = strdup( psz_title );
FORMAT_DESC FORMAT_DESC
...@@ -541,7 +541,7 @@ static int DialogSend( vlc_object_t *p_this, interaction_dialog_t *p_dialog ) ...@@ -541,7 +541,7 @@ static int DialogSend( vlc_object_t *p_this, interaction_dialog_t *p_dialog )
if( p_this->i_flags & OBJECT_FLAGS_NOINTERACT ) return VLC_EGENERIC; if( p_this->i_flags & OBJECT_FLAGS_NOINTERACT ) return VLC_EGENERIC;
if( config_GetInt(p_this, "interact") || if( config_GetInt(p_this, "interact") ||
p_dialog->i_flags & DIALOG_BLOCKING_ERROR || p_dialog->i_flags & DIALOG_BLOCKING_ERROR ||
p_dialog->i_flags & DIALOG_NONBLOCKING_ERROR ) p_dialog->i_flags & DIALOG_NONBLOCKING_ERROR )
{ {
...@@ -568,7 +568,6 @@ static int DialogSend( vlc_object_t *p_this, interaction_dialog_t *p_dialog ) ...@@ -568,7 +568,6 @@ static int DialogSend( vlc_object_t *p_this, interaction_dialog_t *p_dialog )
} }
else else
p_dialog->i_status = UPDATED_DIALOG; p_dialog->i_status = UPDATED_DIALOG;
vlc_mutex_unlock( &p_interaction->object_lock );
if( p_dialog->i_type == INTERACT_DIALOG_TWOWAY ) // Wait for answer if( p_dialog->i_type == INTERACT_DIALOG_TWOWAY ) // Wait for answer
{ {
...@@ -577,15 +576,17 @@ static int DialogSend( vlc_object_t *p_this, interaction_dialog_t *p_dialog ) ...@@ -577,15 +576,17 @@ static int DialogSend( vlc_object_t *p_this, interaction_dialog_t *p_dialog )
p_dialog->i_status != HIDDEN_DIALOG && p_dialog->i_status != HIDDEN_DIALOG &&
!p_dialog->p_parent->b_die ) !p_dialog->p_parent->b_die )
{ {
vlc_mutex_unlock( &p_interaction->object_lock );
msleep( 100000 ); msleep( 100000 );
vlc_mutex_lock( &p_interaction->object_lock );
} }
/// \todo locking ?
if( p_dialog->p_parent->b_die ) if( p_dialog->p_parent->b_die )
{ {
p_dialog->i_return = DIALOG_CANCELLED; p_dialog->i_return = DIALOG_CANCELLED;
p_dialog->i_status = ANSWERED_DIALOG; p_dialog->i_status = ANSWERED_DIALOG;
} }
p_dialog->i_flags |= DIALOG_GOT_ANSWER; p_dialog->i_flags |= DIALOG_GOT_ANSWER;
vlc_mutex_unlock( &p_interaction->object_lock );
return p_dialog->i_return; return p_dialog->i_return;
} }
else else
...@@ -598,4 +599,4 @@ static int DialogSend( vlc_object_t *p_this, interaction_dialog_t *p_dialog ) ...@@ -598,4 +599,4 @@ static int DialogSend( vlc_object_t *p_this, interaction_dialog_t *p_dialog )
} }
else else
return VLC_EGENERIC; return VLC_EGENERIC;
} }
...@@ -29,7 +29,7 @@ static PyObject *gc_test( PyObject *self, PyObject *args ) ...@@ -29,7 +29,7 @@ static PyObject *gc_test( PyObject *self, PyObject *args )
vlc_gc_decref( gc ); vlc_gc_decref( gc );
ASSERT( gc->i_gc_refcount == 1, "Refcount should be 1" ); ASSERT( gc->i_gc_refcount == 1, "Refcount should be 1" );
vlc_gc_decref( gc ); vlc_gc_decref( gc );
Py_INCREF( Py_None ); Py_INCREF( Py_None );
return Py_None; return Py_None;
}; };
......
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