Add a cdda_close that doesn't free the p_cdio pointer for those cases

where an application may want to keep that pointer open.

All routines now are distinct from parnaoia routines with suitable
#defines for compatibility.
This commit is contained in:
rocky
2005-01-26 01:03:16 +00:00
parent 266cb9a65d
commit d7b87a6fad
5 changed files with 93 additions and 25 deletions

View File

@@ -1,5 +1,5 @@
/*
$Id: _cdio_generic.c,v 1.11 2005/01/23 19:16:58 rocky Exp $
$Id: _cdio_generic.c,v 1.12 2005/01/26 01:03:16 rocky Exp $
Copyright (C) 2004, 2005 Rocky Bernstein <rocky@panix.com>
@@ -25,7 +25,7 @@
# include "config.h"
#endif
static const char _rcsid[] = "$Id: _cdio_generic.c,v 1.11 2005/01/23 19:16:58 rocky Exp $";
static const char _rcsid[] = "$Id: _cdio_generic.c,v 1.12 2005/01/26 01:03:16 rocky Exp $";
#include <stdio.h>
#include <stdlib.h>
@@ -88,7 +88,7 @@ cdio_generic_free (void *p_user_data)
track_t i_track;
if (NULL == p_env) return;
free (p_env->source_name);
if (p_env->source_name) free (p_env->source_name);
for (i_track=0; i_track < p_env->i_tracks; i_track++) {
cdtext_destroy(&(p_env->cdtext_track[i_track]));

View File

@@ -1,5 +1,5 @@
/*
$Id: device.c,v 1.7 2005/01/20 00:36:38 rocky Exp $
$Id: device.c,v 1.8 2005/01/26 01:03:16 rocky Exp $
Copyright (C) 2005 Rocky Bernstein <rocky@panix.com>
@@ -276,6 +276,7 @@ cdio_destroy (CdIo_t *p_cdio)
if (p_cdio->op.free != NULL)
p_cdio->op.free (p_cdio->env);
p_cdio->env = NULL;
free (p_cdio);
}