Changeset 127a867bc75e3688f0de69f9abb2ae41dc28faaf

Show
Ignore:
Timestamp:
07/01/08 18:47:38 (2 months ago)
Author:
Rémi Denis-Courmont <rdenis@simphalempin.com>
git-committer:
Rémi Denis-Courmont <rdenis@simphalempin.com> 1214930858 +0300
git-parent:

[acd09b4c95f13abdced07a7903f11e1217042573]

git-author:
Rémi Denis-Courmont <rdenis@simphalempin.com> 1214930543 +0300
Message:

Do not recycle video outputs - fixes #1651

For the same reason as audio outputs. The code was thread-unsafe beyond
repair.

Files:

Legend:

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

    racd09b4 r127a867  
    126126    if( !p_fmt ) 
    127127    { 
    128         /* Reattach video output to the instance before bailing out */ 
     128        /* Video output is no longer used. 
     129         * TODO: support for reusing video outputs with proper _thread-safe_ 
     130         * reference handling. */ 
    129131        if( p_vout ) 
    130132        { 
    131133            spu_Attach( p_vout->p_spu, p_this, false ); 
    132             vlc_object_detach( p_vout ); 
    133             vlc_object_attach( p_vout, p_this->p_libvlc ); 
     134            vlc_object_release( p_vout ); 
    134135        } 
    135136        return NULL; 
     
    141142        vlc_object_yield( p_vout ); 
    142143    } 
    143     else 
    144     { 
    145         p_vout = vlc_object_find( p_this, VLC_OBJECT_VOUT, FIND_CHILD ); 
    146  
    147         if( !p_vout ) 
    148         { 
    149             p_vout = vlc_object_find( p_this->p_libvlc, 
    150                                       VLC_OBJECT_VOUT, FIND_CHILD ); 
    151             /* only first children of p_input for unused vout */ 
    152             if( p_vout && p_vout->p_parent != VLC_OBJECT(p_this->p_libvlc) ) 
    153             { 
    154                 vlc_object_release( p_vout ); 
    155                 p_vout = NULL; 
    156             } 
    157             if( p_vout ) 
    158                 vlc_object_detach( p_vout );    /* Remove it from the GC */ 
    159         } 
    160     } 
     144 
     145    /* TODO: find a suitable unused video output */ 
    161146 
    162147    /* If we now have a video output, check it has the right properties */