chd_stream: support CHDs from GDI files

This commit is contained in:
Brian Koropoff 2017-09-17 14:22:37 -07:00
parent fa6d0fac67
commit 7061cb14fb

View File

@ -103,8 +103,19 @@ chdstream_get_meta(chd_file *chd, int idx, metadata_t *md)
sizeof(meta), &meta_size, NULL, NULL);
if (err == CHDERR_NONE)
{
sscanf(meta, CDROM_TRACK_METADATA_FORMAT,
&md->track, md->type, md->subtype, &md->frames);
sscanf(meta, CDROM_TRACK_METADATA_FORMAT, &md->track, md->type,
md->subtype, &md->frames);
md->extra = padding_frames(md->frames);
return true;
}
err = chd_get_metadata(chd, GDROM_TRACK_METADATA_TAG, idx, meta,
sizeof(meta), &meta_size, NULL, NULL);
if (err == CHDERR_NONE)
{
sscanf(meta, GDROM_TRACK_METADATA_FORMAT, &md->track, md->type,
md->subtype, &md->frames, &md->pad, &md->pregap, md->pgtype,
md->pgsub, &md->postgap);
md->extra = padding_frames(md->frames);
return true;
}