Merged 2313

This commit is contained in:
Moritz Bunkus 2004-10-07 19:20:54 +00:00
parent 0cf20e1d3c
commit 915d0b067c
2 changed files with 11 additions and 2 deletions

View File

@ -1,5 +1,10 @@
2004-10-07 Moritz Bunkus <moritz@bunkus.org>
* mkvextract: bug fix: The track extraction was creating the
output file twice if the Matroska file contained a copy of the
track headers. This resulted in the first extracted file being
overwritten at the end of extraction.
* mmg: bug fix: If the file title is read from an input file, not
modified by the user and that input file is removed again then the
file title will be unset.

View File

@ -1166,7 +1166,7 @@ extract_tracks(const char *file_name) {
KaxBlock *block;
kax_track_t *track;
uint64_t cluster_tc, tc_scale = TIMECODE_SCALE, file_size;
bool ms_compat, delete_element, has_reference;
bool ms_compat, delete_element, has_reference, tracks_found;
int64_t block_duration;
mm_io_c *in;
KaxChapters all_chapters;
@ -1221,6 +1221,8 @@ extract_tracks(const char *file_name) {
delete l0;
}
tracks_found = false;
upper_lvl_el = 0;
// We've got our segment, so let's find the tracks
l1 = es->FindNextElement(l0->Generic().Context, upper_lvl_el, 0xFFFFFFFFL,
@ -1263,11 +1265,13 @@ extract_tracks(const char *file_name) {
}
} else if (EbmlId(*l1) == KaxTracks::ClassInfos.GlobalId) {
} else if ((EbmlId(*l1) == KaxTracks::ClassInfos.GlobalId) &&
!tracks_found) {
// Yep, we've found our KaxTracks element. Now find all tracks
// contained in this segment.
show_element(l1, 1, _("Segment tracks"));
tracks_found = true;
upper_lvl_el = 0;
l2 = es->FindNextElement(l1->Generic().Context, upper_lvl_el,
0xFFFFFFFFL, true, 1);