Changeset 8fa65a4d5895a0cf3e6567dcf1115189580a7439

Show
Ignore:
Timestamp:
28/06/08 21:52:16 (3 months ago)
Author:
Rémi Denis-Courmont <rdenis@simphalempin.com>
git-committer:
Rémi Denis-Courmont <rdenis@simphalempin.com> 1214682736 +0300
git-parent:

[7ca46db5b0de9a4f15de790990303cc46b496e24]

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

Qt4: weak reference the video output...

...so we don't try to vout_Control() it after it's been destroyed.
We cannot yield the video output for real either, as it would prevent
it from being destroyed once it is not needed anymore.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/gui/qt4/components/interface_widgets.cpp

    r02fac42 r8fa65a4  
    6161{ 
    6262    /* Init */ 
    63     p_vout = NULL
     63    i_vout = 0
    6464    hide(); setMinimumSize( 16, 16 ); 
    6565    videoSize.rwidth() = -1; 
     
    9898VideoWidget::~VideoWidget() 
    9999{ 
     100    vout_thread_t *p_vout = i_vout 
     101        ? (vout_thread_t *)vlc_object_get( i_vout ) : NULL; 
     102 
    100103    if( p_vout ) 
    101104    { 
     
    110113                vout_Control( p_vout, VOUT_CLOSE ); 
    111114        } 
     115        vlc_object_release( p_vout ); 
    112116    } 
    113117} 
     
    121125    msg_Dbg( p_intf, "Video was requested %i, %i", *pi_x, *pi_y ); 
    122126    emit askVideoWidgetToShow( *pi_width, *pi_height ); 
    123     if( p_vout ) 
     127    if( i_vout ) 
    124128    { 
    125129        msg_Dbg( p_intf, "embedded video already in use" ); 
    126130        return NULL; 
    127131    } 
    128     p_vout = p_nvout
     132    i_vout = p_nvout->i_object_id
    129133    msg_Dbg( p_intf, "embedded video ready (handle %p)", winId() ); 
    130134    return ( void* )winId(); 
     
    146150{ 
    147151    msg_Dbg( p_intf, "Video is not needed anymore" ); 
    148     p_vout = NULL
     152    i_vout = 0
    149153    videoSize.rwidth() = 0; 
    150154    videoSize.rheight() = 0;