Set propertly nwa for multisession discs.
This commit is contained in:
parent
1b3b80ff6c
commit
7e78db29e4
@ -239,12 +239,6 @@ int isoburn_prepare_disc_aux(struct burn_drive *d, struct burn_disc **disc,
|
|||||||
if(ret<0)
|
if(ret<0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
// TODO check return values for failure. propertly clean-up on error
|
|
||||||
|
|
||||||
*disc = burn_disc_create();
|
|
||||||
session = burn_session_create();
|
|
||||||
burn_disc_add_session(*disc, session, BURN_POS_END);
|
|
||||||
|
|
||||||
wopts.volnum = 0;
|
wopts.volnum = 0;
|
||||||
wopts.level = opts->level;
|
wopts.level = opts->level;
|
||||||
wopts.flags = opts->flags;
|
wopts.flags = opts->flags;
|
||||||
@ -264,11 +258,25 @@ int isoburn_prepare_disc_aux(struct burn_drive *d, struct burn_disc **disc,
|
|||||||
wopts.input_charset = opts->input_charset;
|
wopts.input_charset = opts->input_charset;
|
||||||
wopts.ouput_charset = opts->ouput_charset;
|
wopts.ouput_charset = opts->ouput_charset;
|
||||||
|
|
||||||
wopts.ms_block = (new_img ? 0 : o->nwa);
|
if (new_img) {
|
||||||
|
wopts.ms_block = 0;
|
||||||
|
} else {
|
||||||
|
int lba, nwa;
|
||||||
|
ret = isoburn_disc_track_lba_nwa(d, NULL, 0, &lba, &nwa);
|
||||||
|
if (ret != 1)
|
||||||
|
return -2;
|
||||||
|
wopts.ms_block = nwa;
|
||||||
|
}
|
||||||
|
|
||||||
wopts.src = o->src;
|
wopts.src = o->src;
|
||||||
wopts.overwrite = (new_img ? NULL : o->target_iso_head);
|
wopts.overwrite = (new_img ? NULL : o->target_iso_head);
|
||||||
wsrc = iso_source_new_ecma119(o->target_volset, &wopts);
|
wsrc = iso_source_new_ecma119(o->target_volset, &wopts);
|
||||||
|
|
||||||
|
// TODO check return values for failure. propertly clean-up on error
|
||||||
|
|
||||||
|
*disc = burn_disc_create();
|
||||||
|
session = burn_session_create();
|
||||||
|
burn_disc_add_session(*disc, session, BURN_POS_END);
|
||||||
track = burn_track_create();
|
track = burn_track_create();
|
||||||
burn_track_set_source(track, wsrc);
|
burn_track_set_source(track, wsrc);
|
||||||
burn_session_add_track(session, track, BURN_POS_END);
|
burn_session_add_track(session, track, BURN_POS_END);
|
||||||
|
Loading…
Reference in New Issue
Block a user