diff --git a/libisoburn/trunk/libisoburn/burn_wrap.c b/libisoburn/trunk/libisoburn/burn_wrap.c index b6a3636b..275f9104 100644 --- a/libisoburn/trunk/libisoburn/burn_wrap.c +++ b/libisoburn/trunk/libisoburn/burn_wrap.c @@ -322,16 +322,13 @@ static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d, (*o)->emulation_mode= -1; goto ex; } - if(!(flag & 16)) { - /* try to read emulated toc */ - ret= isoburn_emulate_toc(d, 0); - if(ret<0) { - (*o)->emulation_mode= -1; - goto ex; - } + /* try to read emulated toc */ + ret= isoburn_emulate_toc(d, flag & 16); + if(ret<0) { + (*o)->emulation_mode= -1; + goto ex; } } - } else { /* >>> recognize unsuitable media (but allow read-only media) */; @@ -1113,6 +1110,8 @@ no_memory:; /* @param flag bit0= allow unemulated media bit1= free scanning without enclosing LBA-0-header + bit4= represent emulated media as one single session + (not with bit1) @return -1 severe error, 0= no neat header chain, 1= credible chain read */ int isoburn_emulate_toc(struct burn_drive *d, int flag) @@ -1141,6 +1140,10 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag) {ret= 0; goto failure;} lba= Libisoburn_overwriteable_starT; with_enclosure= 1; + if((flag & 16) && o->emulation_mode == 1) { + ret= 1; + goto failure; /* This will represent the media as single session */ + } } while(lba