mirror of
https://github.com/holub/mame
synced 2025-05-11 00:28:49 +03:00
When copying CHDs, preserve the flag that indicates whether the metadata
is included in the SHA1. When creating LD CHDs, don't use a checksum on the AVLD metadata, like we did before. Fixes recompression of laserdisc CHDs. Fix copy/paste error in the chd.h header which caused the flags passed to be ignored when writing metadata.
This commit is contained in:
parent
658556bba9
commit
d92c81c254
@ -380,8 +380,8 @@ public:
|
||||
chd_error read_metadata(chd_metadata_tag searchtag, UINT32 searchindex, void *output, UINT32 outputlen, UINT32 &resultlen);
|
||||
chd_error read_metadata(chd_metadata_tag searchtag, UINT32 searchindex, dynamic_buffer &output, chd_metadata_tag &resulttag, UINT8 &resultflags);
|
||||
chd_error write_metadata(chd_metadata_tag metatag, UINT32 metaindex, const void *inputbuf, UINT32 inputlen, UINT8 flags = CHD_MDFLAGS_CHECKSUM);
|
||||
chd_error write_metadata(chd_metadata_tag metatag, UINT32 metaindex, const astring &input, UINT8 flags = CHD_MDFLAGS_CHECKSUM) { return write_metadata(metatag, metaindex, input.cstr(), input.len() + 1, flags = CHD_MDFLAGS_CHECKSUM); }
|
||||
chd_error write_metadata(chd_metadata_tag metatag, UINT32 metaindex, const dynamic_buffer &input, UINT8 flags = CHD_MDFLAGS_CHECKSUM) { return write_metadata(metatag, metaindex, input, input.count(), flags = CHD_MDFLAGS_CHECKSUM); }
|
||||
chd_error write_metadata(chd_metadata_tag metatag, UINT32 metaindex, const astring &input, UINT8 flags = CHD_MDFLAGS_CHECKSUM) { return write_metadata(metatag, metaindex, input.cstr(), input.len() + 1, flags); }
|
||||
chd_error write_metadata(chd_metadata_tag metatag, UINT32 metaindex, const dynamic_buffer &input, UINT8 flags = CHD_MDFLAGS_CHECKSUM) { return write_metadata(metatag, metaindex, input, input.count(), flags); }
|
||||
chd_error delete_metadata(chd_metadata_tag metatag, UINT32 metaindex);
|
||||
chd_error clone_all_metadata(chd_file &source);
|
||||
|
||||
|
@ -2001,7 +2001,7 @@ static void do_create_ld(parameters_t ¶ms)
|
||||
// write the final LD metadata
|
||||
if (info.height == 524/2 || info.height == 624/2)
|
||||
{
|
||||
err = chd->write_metadata(AV_LD_METADATA_TAG, 0, chd->ldframedata());
|
||||
err = chd->write_metadata(AV_LD_METADATA_TAG, 0, chd->ldframedata(), 0);
|
||||
if (err != CHDERR_NONE)
|
||||
report_error(1, "Error adding AVLD metadata: %s\n", chd_file::error_string(err));
|
||||
}
|
||||
@ -2111,7 +2111,7 @@ static void do_copy(parameters_t ¶ms)
|
||||
}
|
||||
|
||||
// otherwise, clone it
|
||||
err = chd->write_metadata(metatag, CHDMETAINDEX_APPEND, metadata);
|
||||
err = chd->write_metadata(metatag, CHDMETAINDEX_APPEND, metadata, metaflags);
|
||||
if (err != CHDERR_NONE)
|
||||
report_error(1, "Error writing cloned metadata: %s", chd_file::error_string(err));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user