From 93ba4adb2b891ed8647b412ba5cea1d4db48fb95 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 2 Mar 2005 21:34:35 +0000 Subject: [PATCH] Only add a couple of arguments to the command line if the track in question is not being appended because those parameters are ignored by mkvmerge and the corresponding controls in mmg are deactivated. --- src/mmg/mmg.cpp | 24 +++++++++++++----------- src/mmg/tab_input.cpp | 2 +- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/mmg/mmg.cpp b/src/mmg/mmg.cpp index 926e214b5..af044a710 100644 --- a/src/mmg/mmg.cpp +++ b/src/mmg/mmg.cpp @@ -1333,7 +1333,7 @@ mmg_dialog::update_command_line() { aids += wxT(","); aids += sid; - if (t->aac_is_sbr) { + if (!t->appending && t->aac_is_sbr) { clargs.Add(wxT("--aac-is-sbr")); clargs.Add(sid); } @@ -1357,12 +1357,12 @@ mmg_dialog::update_command_line() { } } - if (t->language != wxT("und")) { + if (!t->appending && (t->language != wxT("und"))) { clargs.Add(wxT("--language")); clargs.Add(sid + wxT(":") + extract_language_code(t->language)); } - if (t->cues != wxT("default")) { + if (!t->appending && (t->cues != wxT("default"))) { clargs.Add(wxT("--cues")); if (t->cues == wxT("only for I frames")) clargs.Add(sid + wxT(":iframes")); @@ -1387,41 +1387,43 @@ mmg_dialog::update_command_line() { clargs.Add(arg); } - if ((t->track_name.Length() > 0) || t->track_name_was_present) { + if (!t->appending && + ((t->track_name.Length() > 0) || t->track_name_was_present)) { clargs.Add(wxT("--track-name")); clargs.Add(sid + wxT(":") + t->track_name); } - if (t->default_track) { + if (!t->appending && t->default_track) { clargs.Add(wxT("--default-track")); clargs.Add(sid); } - if (t->tags.Length() > 0) { + if (!t->appending && (t->tags.Length() > 0)) { clargs.Add(wxT("--tags")); clargs.Add(sid + wxT(":") + t->tags); } - if (!t->display_dimensions_selected && (t->aspect_ratio.Length() > 0)) { + if (!t->appending && !t->display_dimensions_selected && + (t->aspect_ratio.Length() > 0)) { clargs.Add(wxT("--aspect-ratio")); clargs.Add(sid + wxT(":") + t->aspect_ratio); - } else if (t->display_dimensions_selected && + } else if (!t->appending && t->display_dimensions_selected && (t->dwidth.Length() > 0) && (t->dheight.Length() > 0)) { clargs.Add(wxT("--display-dimensions")); clargs.Add(sid + wxT(":") + t->dwidth + wxT("x") + t->dheight); } - if (t->fourcc.Length() > 0) { + if (!t->appending && (t->fourcc.Length() > 0)) { clargs.Add(wxT("--fourcc")); clargs.Add(sid + wxT(":") + t->fourcc); } - if (t->compression.Length() > 0) { + if (!t->appending && (t->compression.Length() > 0)) { clargs.Add(wxT("--compression")); clargs.Add(sid + wxT(":") + t->compression); } - if (t->timecodes.Length() > 0) { + if (!t->appending && (t->timecodes.Length() > 0)) { clargs.Add(wxT("--timecodes")); clargs.Add(sid + wxT(":") + t->timecodes); } diff --git a/src/mmg/tab_input.cpp b/src/mmg/tab_input.cpp index 2d1af0ffa..4ab1c4f09 100644 --- a/src/mmg/tab_input.cpp +++ b/src/mmg/tab_input.cpp @@ -537,7 +537,7 @@ tab_input::audio_track_mode(wxString ctype, cob_sub_charset->Enable(false); cb_default->Enable(true && !appending); cb_aac_is_sbr->Enable(((lctype.Find(wxT("aac")) >= 0) || - (lctype.Find(wxT("mp4a")) >= 0)) && !appending); + (lctype.Find(wxT("mp4a")) >= 0))); tc_tags->Enable(true && !appending); b_browse_tags->Enable(true && !appending); cob_aspect_ratio->Enable(false);