X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fvisualization%2Fgoom.c;h=427bb75d02b8d4db7e58eb6fc7ea97dfeb370bd9;hb=c60652e38ac6afd74bd8225e9dae5406f13aaa4f;hp=d7c6d036a7f251d157dba27939d68f82d7b7d94f;hpb=4572062f504c2aab3079a4dde5bfe3aebb2154b3;p=vlc diff --git a/modules/visualization/goom.c b/modules/visualization/goom.c index d7c6d036a7..427bb75d02 100644 --- a/modules/visualization/goom.c +++ b/modules/visualization/goom.c @@ -36,6 +36,7 @@ #include #include #include +#include #ifdef USE_GOOM_TREE # ifdef OLD_GOOM @@ -171,7 +172,6 @@ static int Open( vlc_object_t *p_this ) if( p_thread->p_vout == NULL ) { msg_Err( p_filter, "no suitable vout module" ); - vlc_object_detach( p_thread ); vlc_object_release( p_thread ); free( p_sys ); return VLC_EGENERIC; @@ -194,7 +194,6 @@ static int Open( vlc_object_t *p_this ) vlc_mutex_destroy( &p_thread->lock ); vlc_cond_destroy( &p_thread->wait ); free( p_thread->psz_title ); - vlc_object_detach( p_thread ); vlc_object_release( p_thread ); free( p_sys ); return VLC_EGENERIC; @@ -354,7 +353,7 @@ static void* Thread( vlc_object_t *p_this ) free( p_thread->psz_title ); p_thread->psz_title = NULL; - while( !( p_pic = vout_CreatePicture( p_thread->p_vout, 0, 0, 0 ) ) && + while( !( p_pic = vout_GetPicture( p_thread->p_vout ) ) && vlc_object_alive (p_thread) ) { msleep( VOUT_OUTMEM_SLEEP ); @@ -365,7 +364,7 @@ static void* Thread( vlc_object_t *p_this ) memcpy( p_pic->p[0].p_pixels, plane, width * height * 4 ); p_pic->date = date_Get( &i_pts ) + GOOM_DELAY; - vout_DisplayPicture( p_thread->p_vout, p_pic ); + vout_PutPicture( p_thread->p_vout, p_pic ); } goom_close( p_plugin_info ); @@ -394,7 +393,6 @@ static void Close( vlc_object_t *p_this ) aout_filter_RequestVout( p_filter, p_sys->p_thread->p_vout, 0 ); vlc_mutex_destroy( &p_sys->p_thread->lock ); vlc_cond_destroy( &p_sys->p_thread->wait ); - vlc_object_detach( p_sys->p_thread ); while( p_sys->p_thread->i_blocks-- ) { @@ -408,12 +406,7 @@ static void Close( vlc_object_t *p_this ) static char *TitleGet( vlc_object_t *p_this ) { - playlist_t *pl = pl_Hold( p_this ); - if( !pl ) - return NULL; - - input_thread_t *p_input = playlist_CurrentInput( pl ); - pl_Release( p_this ); + input_thread_t *p_input = playlist_CurrentInput( pl_Get( p_this ) ); if( !p_input ) return NULL; @@ -423,7 +416,7 @@ static char *TitleGet( vlc_object_t *p_this ) free( psz_title ); char *psz_uri = input_item_GetURI( input_GetItem( p_input ) ); - const char *psz = strrchr( psz_orig, '/' ); + const char *psz = strrchr( psz_uri, '/' ); if( psz ) { psz_title = strdup( psz + 1 );