Merged 2324

This commit is contained in:
Moritz Bunkus 2004-10-08 19:51:49 +00:00
parent 4e95b1de0f
commit 7f2da5eb94
3 changed files with 34 additions and 37 deletions

View File

@ -1,3 +1,9 @@
2004-10-08 Moritz Bunkus <moritz@bunkus.org>
* mkvinfo: bug fix: The chapter and tag element tables were not
initialized on Windows resulting in a crash when one of those
elements was encountered.
2004-10-07 Moritz Bunkus <moritz@bunkus.org> 2004-10-07 Moritz Bunkus <moritz@bunkus.org>
* Released v0.9.6. * Released v0.9.6.

View File

@ -1894,26 +1894,6 @@ process_file(const char *file_name) {
} }
} }
int
console_main(int argc,
char **argv) {
char *file_name;
#if defined(SYS_UNIX) || defined(COMP_CYGWIN)
nice(2);
#endif
parse_args(argc, argv, file_name);
if (file_name == NULL) {
usage();
mxexit(0);
}
if (process_file(file_name))
return 0;
else
return 1;
}
void void
setup() { setup() {
#if defined(HAVE_LIBINTL_H) #if defined(HAVE_LIBINTL_H)
@ -1934,20 +1914,36 @@ cleanup() {
utf8_done(); utf8_done();
} }
int
console_main(int argc,
char **argv) {
char *file_name;
bool ok;
#if defined(SYS_UNIX) || defined(COMP_CYGWIN)
nice(2);
#endif
setup();
parse_args(argc, argv, file_name);
if (file_name == NULL) {
usage();
mxexit(0);
}
ok = process_file(file_name);
cleanup();
if (ok)
return 0;
else
return 1;
}
#if !defined HAVE_WXWINDOWS #if !defined HAVE_WXWINDOWS
int int
main(int argc, main(int argc,
char **argv) { char **argv) {
char *initial_file; return console_main(argc, argv);
int res;
setup();
parse_args(argc, argv, initial_file);
res = console_main(argc, argv);
cleanup();
return res;
} }
#elif defined(SYS_UNIX) || defined(SYS_APPLE) #elif defined(SYS_UNIX) || defined(SYS_APPLE)
@ -1956,20 +1952,14 @@ int
main(int argc, main(int argc,
char **argv) { char **argv) {
char *initial_file; char *initial_file;
int res;
setup();
parse_args(argc, argv, initial_file); parse_args(argc, argv, initial_file);
if (use_gui) { if (use_gui) {
wxEntry(argc, argv); wxEntry(argc, argv);
return 0; return 0;
} else } else
res = console_main(argc, argv); return console_main(argc, argv);
cleanup();
return res;
} }
#endif // HAVE_WXWINDOWS #endif // HAVE_WXWINDOWS

View File

@ -67,6 +67,7 @@ mi_app::OnInit() {
return false; return false;
} }
setup();
frame = new mi_frame(wxT("mkvinfo"), wxPoint(50, 50), wxSize(600, 400)); frame = new mi_frame(wxT("mkvinfo"), wxPoint(50, 50), wxSize(600, 400));
frame->Show(true); frame->Show(true);
frame->Refresh(true); frame->Refresh(true);