diff --git a/src/merge/mkvmerge.cpp b/src/merge/mkvmerge.cpp index c327832ad..ff1018a74 100644 --- a/src/merge/mkvmerge.cpp +++ b/src/merge/mkvmerge.cpp @@ -682,7 +682,7 @@ parse_arg_display_dimensions(const std::string s, std::vector dims = split(parts[1], "x", 2); int64_t id = 0; - int w, h; + int w = 0, h = 0; if ((dims.size() != 2) || !parse_number(parts[0], id) || !parse_number(dims[0], w) || !parse_number(dims[1], h) || (0 >= w) || (0 >= h)) mxerror(boost::format(Y("Display dimensions: not given in the form :x, e.g. 1:640x480 (argument was '%1%').\n")) % s); diff --git a/src/merge/timecode_factory.cpp b/src/merge/timecode_factory.cpp index f99dd887a..b76f34030 100644 --- a/src/merge/timecode_factory.cpp +++ b/src/merge/timecode_factory.cpp @@ -35,7 +35,7 @@ timecode_factory_c::create(const std::string &file_name, } std::string line; - int version; + int version = -1; if (!in->getline2(line) || !balg::istarts_with(line, "# timecode format v") || !parse_number(&line[strlen("# timecode format v")], version)) mxerror(boost::format(Y("The timecode file '%1%' contains an unsupported/unrecognized format line. The very first line must look like '# timecode format v1'.\n")) % file_name);