Changeset 13c61234f856eec2ede84508e6c87334345f630b

Show
Ignore:
Timestamp:
06/05/06 18:00:27 (2 years ago)
Author:
Filippo Carone <littlejohn@videolan.org>
git-committer:
Filippo Carone <littlejohn@videolan.org> 1149523227 +0000
git-parent:

[d09a0fbf9b816cdc0e91c2a87b0126543c36bbcc]

git-author:
Filippo Carone <littlejohn@videolan.org> 1149523227 +0000
Message:

libvlc: Vout object now released when needed

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/control/input.c

    rd09a0fb r13c6123  
    135135    } 
    136136 
    137     if ( !p_input_thread->b_die && !p_input_thread->b_dead ) 
     137    if ( !p_input_thread->b_die && !p_input_thread->b_dead )  
     138    { 
     139        vlc_object_release( p_input_thread ); 
    138140        return VLC_TRUE; 
    139  
     141    } 
     142     
     143    vlc_object_release( p_input_thread ); 
    140144    return VLC_FALSE; 
    141145} 
    142  
    143 vlc_bool_t libvlc_input_has_vout( libvlc_input_t *p_input, 
    144                                   libvlc_exception_t *p_e ) 
    145 { 
    146     vout_thread_t *p_vout = GetVout( p_input, p_e ); 
    147  
    148     /* GetVout will raise the exception for us */ 
    149     if( !p_vout ) 
    150     { 
    151         return VLC_FALSE; 
    152     } 
    153  
    154     return VLC_TRUE; 
    155 } 
  • src/control/video.c

    rd09a0fb r13c6123  
    2828#include <vlc/intf.h> 
    2929 
    30 vout_thread_t *GetVout( libvlc_input_t *p_input, 
     30static vout_thread_t *GetVout( libvlc_input_t *p_input, 
    3131                               libvlc_exception_t *p_exception ) 
    3232{ 
     
    8181        libvlc_exception_raise( p_e, 
    8282                        "Unexpected error while setting fullscreen value" ); 
     83 
     84    vlc_object_release( p_vout1 ); 
     85 
    8386} 
    8487 
     
    123126        libvlc_exception_raise( p_e, 
    124127                        "Unexpected error while setting fullscreen value" ); 
     128 
     129    vlc_object_release( p_vout1 ); 
     130 
    125131} 
    126132 
     
    183189    return p_vout1->i_window_width; 
    184190} 
     191 
     192vlc_bool_t libvlc_input_has_vout( libvlc_input_t *p_input, 
     193                                  libvlc_exception_t *p_e ) 
     194{ 
     195    vout_thread_t *p_vout = GetVout( p_input, p_e ); 
     196 
     197    /* GetVout will raise the exception for us */ 
     198    if( !p_vout ) 
     199    { 
     200        return VLC_FALSE; 
     201    } 
     202 
     203    vlc_object_release( p_vout ); 
     204     
     205    return VLC_TRUE; 
     206}