cdio.c: missing string for discmode enumeration.
_cdio_osx.c: fix a couple of bus faults. Detects DVD-RW properly now. Better error message for failing to read TOC.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: _cdio_osx.c,v 1.63 2004/08/29 03:05:53 rocky Exp $
|
$Id: _cdio_osx.c,v 1.64 2004/08/29 03:45:34 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
||||||
from vcdimager code:
|
from vcdimager code:
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char _rcsid[] = "$Id: _cdio_osx.c,v 1.63 2004/08/29 03:05:53 rocky Exp $";
|
static const char _rcsid[] = "$Id: _cdio_osx.c,v 1.64 2004/08/29 03:45:34 rocky Exp $";
|
||||||
|
|
||||||
#include <cdio/sector.h>
|
#include <cdio/sector.h>
|
||||||
#include <cdio/util.h>
|
#include <cdio/util.h>
|
||||||
@@ -409,6 +409,8 @@ get_discmode_osx (void *p_user_data)
|
|||||||
i_discmode = CDIO_DISC_MODE_DVD_PRW;
|
i_discmode = CDIO_DISC_MODE_DVD_PRW;
|
||||||
else if (0 == strncmp(str, "DVD-R", sizeof(str)) )
|
else if (0 == strncmp(str, "DVD-R", sizeof(str)) )
|
||||||
i_discmode = CDIO_DISC_MODE_DVD_R;
|
i_discmode = CDIO_DISC_MODE_DVD_R;
|
||||||
|
else if (0 == strncmp(str, "DVD-RW", sizeof(str)) )
|
||||||
|
i_discmode = CDIO_DISC_MODE_DVD_RW;
|
||||||
else if (0 == strncmp(str, "DVD-ROM", sizeof(str)) )
|
else if (0 == strncmp(str, "DVD-ROM", sizeof(str)) )
|
||||||
i_discmode = CDIO_DISC_MODE_DVD_ROM;
|
i_discmode = CDIO_DISC_MODE_DVD_ROM;
|
||||||
else if (0 == strncmp(str, "DVD-RAM", sizeof(str)) )
|
else if (0 == strncmp(str, "DVD-RAM", sizeof(str)) )
|
||||||
@@ -868,7 +870,7 @@ read_toc_osx (void *p_user_data)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cdio_warn( "CFDictionaryGetValue failed" );
|
cdio_warn( "Trouble reading TOC" );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -988,11 +990,12 @@ read_toc_osx (void *p_user_data)
|
|||||||
False is returned if there is no track entry.
|
False is returned if there is no track entry.
|
||||||
*/
|
*/
|
||||||
static lsn_t
|
static lsn_t
|
||||||
get_track_lba_osx(void *user_data, track_t i_track)
|
get_track_lba_osx(void *p_user_data, track_t i_track)
|
||||||
{
|
{
|
||||||
_img_private_t *p_env = user_data;
|
_img_private_t *p_env = p_user_data;
|
||||||
|
|
||||||
if (!p_env->gen.toc_init) read_toc_osx (p_env) ;
|
if (!p_env->gen.toc_init) read_toc_osx (p_env) ;
|
||||||
|
if (!p_env->gen.toc_init) return CDIO_INVALID_LSN;
|
||||||
|
|
||||||
if (i_track == CDIO_CDROM_LEADOUT_TRACK) i_track = p_env->i_last_track+1;
|
if (i_track == CDIO_CDROM_LEADOUT_TRACK) i_track = p_env->i_last_track+1;
|
||||||
|
|
||||||
|
|||||||
15
lib/cdio.c
15
lib/cdio.c
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: cdio.c,v 1.71 2004/08/28 09:15:41 rocky Exp $
|
$Id: cdio.c,v 1.72 2004/08/29 03:45:35 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
||||||
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
#include <cdio/logging.h>
|
#include <cdio/logging.h>
|
||||||
#include "cdio_private.h"
|
#include "cdio_private.h"
|
||||||
|
|
||||||
static const char _rcsid[] = "$Id: cdio.c,v 1.71 2004/08/28 09:15:41 rocky Exp $";
|
static const char _rcsid[] = "$Id: cdio.c,v 1.72 2004/08/29 03:45:35 rocky Exp $";
|
||||||
|
|
||||||
|
|
||||||
const char *track_format2str[6] =
|
const char *track_format2str[6] =
|
||||||
@@ -50,8 +50,15 @@ const char *track_format2str[6] =
|
|||||||
/* Must match discmode enumeration */
|
/* Must match discmode enumeration */
|
||||||
const char *discmode2str[] = {
|
const char *discmode2str[] = {
|
||||||
"CD-DA",
|
"CD-DA",
|
||||||
"CD-DATA Form 1", "CD DATA Form 2", "CD-ROM Mixed",
|
"CD-DATA Form 1",
|
||||||
"DVD-ROM", "DVD-RAM", "DVD-R", "DVD-RW", "DVD+RW",
|
"CD DATA Form 2",
|
||||||
|
"CD-ROM Mixed",
|
||||||
|
"DVD-ROM",
|
||||||
|
"DVD-RAM",
|
||||||
|
"DVD-R",
|
||||||
|
"DVD-RW",
|
||||||
|
"DVD+R",
|
||||||
|
"DVD+RW",
|
||||||
"Unknown/unclassified DVD",
|
"Unknown/unclassified DVD",
|
||||||
"No information",
|
"No information",
|
||||||
"Error in getting information"
|
"Error in getting information"
|
||||||
|
|||||||
Reference in New Issue
Block a user