From 5075aa7ebc4cdf2d53ba2aec9ffe7b544e6608e7 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 5 Dec 2003 12:04:54 +0000 Subject: [PATCH] Use negative track IDs for mkvmerge -i and Ogg files. Allow negative track IDs in --track-order for the same reason. --- ChangeLog | 5 +++++ src/input/r_ogm.cpp | 2 +- src/mkvmerge.cpp | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7c6f32e83..df1101efe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-12-05 Moritz Bunkus + + * mkvmerge: bug fix: Negative track IDs in Ogg files were reported + incorrectly for mkvmerge -i (which affected the GUI). + 2003-12-04 Moritz Bunkus * mmg: new feature: Added "up" and "down" buttons for the tracks, diff --git a/src/input/r_ogm.cpp b/src/input/r_ogm.cpp index c2a92cabd..9ab270dd2 100644 --- a/src/input/r_ogm.cpp +++ b/src/input/r_ogm.cpp @@ -1033,7 +1033,7 @@ void ogm_reader_c::identify() { memcpy(fourcc, sth->subtype, 4); fourcc[4] = 0; } - mxinfo("Track ID %u: %s (%s)\n", sdemuxers[i]->serial, + mxinfo("Track ID %d: %s (%s)\n", sdemuxers[i]->serial, (sdemuxers[i]->stype == OGM_STREAM_TYPE_VORBIS || sdemuxers[i]->stype == OGM_STREAM_TYPE_PCM || sdemuxers[i]->stype == OGM_STREAM_TYPE_MP3 || diff --git a/src/mkvmerge.cpp b/src/mkvmerge.cpp index e2c25641d..0421a0dd7 100644 --- a/src/mkvmerge.cpp +++ b/src/mkvmerge.cpp @@ -939,7 +939,7 @@ static void parse_track_order(const char *s, track_info_c &ti) { parts = split(s, ","); strip(parts); for (i = 0; i < parts.size(); i++) { - if (!parse_int(parts[i].c_str(), id) || (id < 0)) + if (!parse_int(parts[i].c_str(), id)) mxerror("'%s' is not a valid track ID in '--track-order %s'.\n", parts[i].c_str(), s); ti.track_order->push_back(id);