Changeset c55222a882256a2c28245dc6cf9486bcf969befd

Show
Ignore:
Timestamp:
10/06/08 16:59:13 (4 months ago)
Author:
Antoine Cellerier <dionoea@videolan.org>
git-committer:
Antoine Cellerier <dionoea@videolan.org> 1213109953 +0200
git-parent:

[bb03e12e367a4e3a5e8127fd5ebc1a7eb670c4f0]

git-author:
Antoine Cellerier <dionoea@videolan.org> 1213109953 +0200
Message:

Unregister a "sub filter"'s private SPU channel when destroying the
filter. Since filter destruction is always requested by the subpicture
core itself, we already have the subpicture lock so no need to lock.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/video_output/vout_subpictures.c

    rbb03e12 rc55222a  
    11431143 * corresponding to i_channel_id. 
    11441144 *****************************************************************************/ 
    1145 static void SpuClearChannel( spu_t *p_spu, int i_channel
     1145static void SpuClearChannel( spu_t *p_spu, int i_channel, bool b_locked
    11461146{ 
    11471147    int          i_subpic;                               /* subpicture index */ 
    11481148    subpicture_t *p_subpic = NULL;                  /* first free subpicture */ 
    11491149 
    1150     vlc_mutex_lock( &p_spu->subpicture_lock ); 
     1150    if( !b_locked ) 
     1151        vlc_mutex_lock( &p_spu->subpicture_lock ); 
    11511152 
    11521153    for( i_subpic = 0; i_subpic < VOUT_MAX_SUBPICTURES; i_subpic++ ) 
     
    11741175    } 
    11751176 
    1176     vlc_mutex_unlock( &p_spu->subpicture_lock ); 
     1177    if( !b_locked ) 
     1178        vlc_mutex_unlock( &p_spu->subpicture_lock ); 
    11771179} 
    11781180 
     
    11931195    case SPU_CHANNEL_CLEAR: 
    11941196        i = (int)va_arg( args, int ); 
    1195         SpuClearChannel( p_spu, i ); 
     1197        SpuClearChannel( p_spu, i, false ); 
    11961198        break; 
    11971199 
     
    13651367static void sub_filter_allocation_clear( filter_t *p_filter ) 
    13661368{ 
     1369    filter_owner_sys_t *p_sys = p_filter->p_owner; 
     1370    SpuClearChannel( p_sys->p_spu, p_sys->i_channel, true ); 
    13671371    free( p_filter->p_owner ); 
    13681372}