Show
Ignore:
Timestamp:
07/18/08 20:47:20 (1 month ago)
Author:
Laurent Aimar <fenrir@videolan.org>
git-committer:
Laurent Aimar <fenrir@videolan.org> 1216406840 +0200
git-parent:

[efa30ea7db66a2e445f5622c04256bd8170234c5]

git-author:
Laurent Aimar <fenrir@videolan.org> 1216406840 +0200
Message:

Added new picture helpers (picture_Yield, picture_Release,
picture_CopyProperties) and use them inside vlc core.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/misc/image.c

    r76ab469 raf37ba1  
    140140             != NULL ) 
    141141    { 
    142         if ( p_pic != NULL ) 
    143             p_pic->pf_release( p_pic ); 
     142        if( p_pic != NULL ) 
     143            picture_Release( p_pic ); 
    144144        p_pic = p_tmp; 
    145145    } 
     
    189189            if( !p_image->p_filter ) 
    190190            { 
    191                 p_pic->pf_release( p_pic ); 
     191                picture_Release( p_pic ); 
    192192                return NULL; 
    193193            } 
     
    317317        } 
    318318 
    319         if( p_pic->pf_release ) 
    320             p_pic->i_refcount++; 
     319        picture_Yield( p_pic ); 
     320 
    321321        p_tmp_pic = 
    322322            p_image->p_filter->pf_video_filter( p_image->p_filter, p_pic ); 
     
    447447    } 
    448448 
    449     if( p_pic->pf_release ) 
    450         p_pic->i_refcount++; 
     449    picture_Yield( p_pic ); 
     450 
    451451    p_pif = p_image->p_filter->pf_video_filter( p_image->p_filter, p_pic ); 
    452452 
     
    456456    { 
    457457        /* Duplicate image */ 
    458         p_pif->pf_release( p_pif ); /* XXX: Better fix must be possible */ 
     458        picture_Release( p_pif ); /* XXX: Better fix must be possible */ 
    459459        p_pif = p_image->p_filter->pf_vout_buffer_new( p_image->p_filter ); 
    460460        if( p_pif ) vout_CopyPicture( p_image->p_parent, p_pif, p_pic ); 
     
    494494    } 
    495495 
    496     if( p_pic->pf_release ) 
    497         p_pic->i_refcount++; 
     496    picture_Yield( p_pic ); 
     497 
    498498    return p_image->p_filter->pf_video_filter( p_image->p_filter, p_pic ); 
    499499} 
     
    612612{ 
    613613    (void)p_dec; 
    614     p_pic->i_refcount++
     614    picture_Yield( p_pic )
    615615} 
    616616 
    617617static void video_unlink_picture( decoder_t *p_dec, picture_t *p_pic ) 
    618618{ 
    619     (void)p_dec; (void)p_pic; 
    620     video_release_buffer( p_pic ); 
     619    (void)p_dec; 
     620    picture_Release( p_pic ); 
    621621} 
    622622