mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-28 13:57:22 +00:00
Avoid the use of uninitialized variables
This commit is contained in:
parent
fbcf15f5db
commit
0bbeddb627
@ -682,7 +682,7 @@ parse_arg_display_dimensions(const std::string s,
|
||||
|
||||
std::vector<std::string> 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 <TID>:<width>x<height>, e.g. 1:640x480 (argument was '%1%').\n")) % s);
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user