Changeset fc4b15d52c076830edfe81abb8dd9833ca630c8b

Show
Ignore:
Timestamp:
12/10/04 12:21:49 (4 years ago)
Author:
Gildas Bazin <gbazin@videolan.org>
git-committer:
Gildas Bazin <gbazin@videolan.org> 1097576509 +0000
git-parent:

[15baf3d1f53f62ccbf81cfc737c5ada6b436c5e3]

git-author:
Gildas Bazin <gbazin@videolan.org> 1097576509 +0000
Message:

* src/video_output/video_output.c: even uglier fix for the on-the-fly deinterlacing switch problem (but at least it works).

Files:

Legend:

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

    r15baf3d rfc4b15d  
    13061306    VLC_COMMON_MEMBERS 
    13071307    input_thread_t *p_input; 
     1308    vout_thread_t *p_vout; 
     1309    char *psz_mode; 
    13081310 
    13091311} suxor_thread_t; 
     
    13121314{ 
    13131315    vlc_value_t val; 
     1316 
     1317    if( p_this->psz_mode ) 
     1318    { 
     1319        vlc_value_t val; 
     1320        val.psz_string = p_this->psz_mode; 
     1321        var_Set( p_this->p_vout, "deinterlace-mode", val ); 
     1322        free( p_this->psz_mode ); 
     1323    } 
     1324 
     1325    if( p_this->p_vout ) vlc_object_release( p_this->p_vout ); 
    13141326 
    13151327    /* Now restart current video stream */ 
     
    13781390    if( psz_mode && *psz_mode ) 
    13791391    { 
     1392        /* Modify input as well because the vout might have to be restarted */ 
    13801393        val.psz_string = psz_mode; 
    1381         var_Set( p_vout, "deinterlace-mode", val ); 
    1382         /* Modify input as well because the vout might have to be restarted */ 
    13831394        var_Create( p_input, "deinterlace-mode", VLC_VAR_STRING ); 
    13841395        var_Set( p_input, "deinterlace-mode", val ); 
     
    13921403    if( val.i_int >= 0 ) 
    13931404    { 
    1394         if( p_vout->p_parent_intf ) 
    1395         { 
    1396             p_vout->b_filter_change = VLC_TRUE; 
    1397             suxor_thread_t *p_suxor = 
    1398                 vlc_object_create( p_vout, sizeof(suxor_thread_t) ); 
    1399             p_suxor->p_input = p_input; 
    1400             vlc_object_yield( p_input ); 
    1401             vlc_thread_create( p_suxor, "suxor", SuxorRestartVideoES, 
    1402                                VLC_THREAD_PRIORITY_LOW, VLC_FALSE ); 
    1403         } 
    1404         else 
    1405         { 
    1406             vlc_value_t val_es; 
    1407             val_es.i_int = -VIDEO_ES; 
    1408             p_vout->b_filter_change = VLC_TRUE; 
    1409             var_Set( p_input, "video-es", val_es ); 
    1410             var_Set( p_input, "video-es", val ); 
    1411         } 
     1405        p_vout->b_filter_change = VLC_TRUE; 
     1406        suxor_thread_t *p_suxor = 
     1407            vlc_object_create( p_vout, sizeof(suxor_thread_t) ); 
     1408        p_suxor->p_input = p_input; vlc_object_yield( p_input ); 
     1409        p_suxor->p_vout = p_vout; vlc_object_yield( p_vout ); 
     1410        if( psz_mode && *psz_mode ) 
     1411            p_suxor->psz_mode = strdup( psz_mode ); 
     1412        vlc_thread_create( p_suxor, "suxor", SuxorRestartVideoES, 
     1413                           VLC_THREAD_PRIORITY_LOW, VLC_FALSE ); 
    14121414    } 
    14131415 
     
    14401442    if( val.i_int >= 0 ) 
    14411443    { 
    1442         if( p_vout->p_parent_intf ) 
    1443         { 
    1444             p_vout->b_filter_change = VLC_TRUE; 
    1445             suxor_thread_t *p_suxor = 
    1446                 vlc_object_create( p_vout, sizeof(suxor_thread_t) ); 
    1447             p_suxor->p_input = p_input; 
    1448             vlc_object_yield( p_input ); 
    1449             vlc_thread_create( p_suxor, "suxor", SuxorRestartVideoES, 
    1450                                VLC_THREAD_PRIORITY_LOW, VLC_FALSE ); 
    1451         } 
    1452         else 
    1453         { 
    1454             vlc_value_t val_es; 
    1455             val_es.i_int = -VIDEO_ES; 
    1456             p_vout->b_filter_change = VLC_TRUE; 
    1457             var_Set( p_input, "video-es", val_es ); 
    1458             var_Set( p_input, "video-es", val ); 
    1459         } 
     1444        p_vout->b_filter_change = VLC_TRUE; 
     1445        suxor_thread_t *p_suxor = 
     1446            vlc_object_create( p_vout, sizeof(suxor_thread_t) ); 
     1447        p_suxor->p_input = p_input; 
     1448        vlc_object_yield( p_input ); 
     1449        vlc_thread_create( p_suxor, "suxor", SuxorRestartVideoES, 
     1450                           VLC_THREAD_PRIORITY_LOW, VLC_FALSE ); 
    14601451    } 
    14611452