Changeset aeaf0da4ea02c39b49bc49493a8a6c2de3dec411

Show
Ignore:
Timestamp:
28/05/08 02:46:01 (5 months ago)
Author:
Pierre d'Herbemont <pdherbemont@videolan.org>
git-committer:
Pierre d'Herbemont <pdherbemont@videolan.org> 1211935561 +0200
git-parent:

[d682e91e10f9ceabfb52385e0956e1fabba9928c]

git-author:
Pierre d'Herbemont <pdherbemont@videolan.org> 1211935561 +0200
Message:

video_output: Make sure we check p_vout->b_die inside the object lock.

Files:

Legend:

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

    r6475cab raeaf0da  
    763763        return; 
    764764 
     765    vlc_object_lock( p_vout ); 
     766 
    765767    if( p_vout->b_title_show ) 
    766768        DisplayTitleOnOSD( p_vout ); 
     
    770772     * initialization 
    771773     */ 
    772     while( (!p_vout->b_die) && (!p_vout->b_error) ) 
     774    while( (vlc_object_alive( p_vout )) && (!p_vout->b_error) ) 
    773775    { 
    774776        /* Initialize loop variables */ 
     
    10921094        vlc_mutex_unlock( &p_vout->change_lock ); 
    10931095 
     1096        vlc_object_unlock( p_vout ); 
     1097 
    10941098        /* Sleep a while or until a given date */ 
    10951099        if( display_date != 0 ) 
     
    11091113        /* On awakening, take back lock and send immediately picture 
    11101114         * to display. */ 
     1115        vlc_object_lock( p_vout ); 
     1116        /* Note: vlc_object_alive() could be false here, and we 
     1117         * could be dead */ 
    11111118        vlc_mutex_lock( &p_vout->change_lock ); 
    11121119 
     
    12021209    } 
    12031210 
     1211 
    12041212    if( p_input ) 
    12051213    { 
     
    12171225    /* End of thread */ 
    12181226    EndThread( p_vout ); 
     1227    vlc_object_unlock( p_vout ); 
    12191228} 
    12201229