Changeset 68bcb6a4322b55b70c231a597d7b45a5406fd7f8

Show
Ignore:
Timestamp:
05/15/08 22:13:41 (2 months ago)
Author:
Pierre d'Herbemont <pdherbemont@videolan.org>
git-committer:
Pierre d'Herbemont <pdherbemont@videolan.org> 1210882421 +0200
git-parent:

[31013e299b7a9deeef36bbc9c9ead08fc9cfdcda]

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

vlc: Make sure we call libvlc_release() when we are requested to die.

Note: I don't think we did yet match the old behaviour, if we hit ctrl-c while in libvlc_new(), vlc isn't killed properly.

Files:

Legend:

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

    r2a855b1 r68bcb6a  
    5656static void *SigHandler (void *set); 
    5757#endif 
     58 
     59/* running vlc instance */ 
     60static libvlc_instance_t * vlc = NULL; 
    5861 
    5962/***************************************************************************** 
     
    185188 
    186189    /* Initialize libvlc */ 
    187     libvlc_instance_t *vlc = libvlc_new (i_argc, ppsz_argv, &ex); 
     190    vlc = libvlc_new (i_argc, ppsz_argv, &ex); 
    188191    if (vlc != NULL) 
    189192    { 
     
    253256            fprintf (stderr, "signal %d received, terminating vlc - do it " 
    254257                            "again quickly in case it gets stuck\n", i_signal); 
    255             //VLC_Die( 0 ); 
     258            if (vlc) libvlc_release( vlc ); 
    256259        } 
    257260        else /* time (NULL) <= abort_time */