get_video_desc_from_string: print error if unknown

Print an error if unknown mode was given, which could give the user a
guidance what is wrong, eg.:
`uv -t testcard:mode=bogus`

outputted just`[testcard] Wrong video size, given: 0x0`, which isn't
much helpful. Now it outputs also `[video] Unrecognized video mode: bogus`
This commit is contained in:
Martin Pulec
2023-11-14 16:43:20 +01:00
parent 9b1f2fea70
commit 0b9ee8e7ea

View File

@@ -350,6 +350,7 @@ struct video_desc get_video_desc_from_string(const char *string)
ret.height = 2160;
}
if (ret.width == 0) {
MSG(ERROR, "Unrecognized video mode: %s\n", string);
return {};
}
ret.fps = parse_fps(string, ret.interlacing == INTERLACED_MERGED);