Keep tags when reading Matroska files.

This commit is contained in:
Moritz Bunkus 2004-03-09 22:08:35 +00:00
parent ff7e9fceb9
commit 346aa044b0
4 changed files with 14 additions and 5 deletions

View File

@ -1,5 +1,8 @@
2004-03-09 Moritz Bunkus <moritz@bunkus.org>
* mkvmerge: new feature: Tags are being kept when reading Matroska
files.
* mkvmerge: bug fix: Large values for --sync (over 2100) would
cause an integer overflow resulting in no sync being done at all.

2
TODO
View File

@ -6,6 +6,4 @@ In no particular order:
* mvkmerge:
- Keep tags when reading from Matroska files.
- Split packed video stuff into proper B frames.

View File

@ -1460,6 +1460,10 @@ kax_reader_c::create_packetizer(int64_t tid) {
if (nti->track_name == NULL)
nti->track_name = safestrdup(t->track_name);
nti->id = t->tnum; // ID for this track.
if (t->tag != NULL) {
nti->tags = new KaxTags;
nti->tags->PushElement(*t->tag);
}
if (hack_engaged(ENGAGE_FORCE_PASSTHROUGH_PACKETIZER)) {
init_passthrough_packetizer(t);
@ -1655,6 +1659,8 @@ kax_reader_c::create_packetizer(int64_t tid) {
break;
}
set_packetizer_headers(t);
if (t->tag != NULL)
nti->tags->Remove(0);
delete nti;
}
}

View File

@ -77,7 +77,7 @@ generic_packetizer_c::generic_packetizer_c(generic_reader_c *nreader,
ti->async.linear = 1.0;
ti->async.displacement = 0;
} else
ti->async.displacement *= 1000000; // ms to ns
ti->async.displacement *= (int64_t)1000000; // ms to ns
initial_displacement = ti->async.displacement;
ti->async.displacement = 0;
@ -1155,8 +1155,10 @@ track_info_c &track_info_c::operator =(const track_info_c &src) {
for (i = 0; i < src.all_tags->size(); i++)
(*all_tags)[i].file_name = safestrdup((*src.all_tags)[i].file_name);
tags_ptr = src.tags_ptr;
tags = NULL;
// tags = src.tags;
if (src.tags != NULL)
tags = static_cast<KaxTags *>(src.tags->Clone());
else
tags = NULL;
aac_is_sbr = new vector<int64_t>(*src.aac_is_sbr);