Changeset 460b1fca8424088c9e87ca455338e0f446ac2476

Show
Ignore:
Timestamp:
06/09/04 23:07:43 (4 years ago)
Author:
Eric Petit <titer@videolan.org>
git-committer:
Eric Petit <titer@videolan.org> 1094504863 +0000
git-parent:

[381fcdb7866f29786566f5dbf7cfbf112c9868b4]

git-author:
Eric Petit <titer@videolan.org> 1094504863 +0000
Message:

+ src/input/var.c: when starting a title, don't recreate next/prev-chapter

and add callbacks if they already exist

Files:

Legend:

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

    r25d2a66 r460b1fc  
    334334 
    335335    /* Create/Destroy command variables */ 
    336     if( t->i_seekpoint > 1 ) 
     336    if( t->i_seekpoint <= 1 ) 
     337    { 
     338        var_Destroy( p_input, "next-chapter" ); 
     339        var_Destroy( p_input, "prev-chapter" ); 
     340    } 
     341    else if( var_Get( p_input, "next-chapter", &val ) != VLC_SUCCESS ) 
    337342    { 
    338343        vlc_value_t text; 
     
    347352        var_Change( p_input, "prev-chapter", VLC_VAR_SETTEXT, &text, NULL ); 
    348353        var_AddCallback( p_input, "prev-chapter", SeekpointCallback, NULL ); 
    349     } 
    350     else 
    351     { 
    352         var_Destroy( p_input, "next-chapter" ); 
    353         var_Destroy( p_input, "prev-chapter" ); 
    354354    } 
    355355