Skip to content

Commit

Permalink
get_video_desc_from_string: print error if unknown
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
MartinPulec committed Nov 14, 2023
1 parent 9b1f2fe commit 0b9ee8e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0b9ee8e

Please sign in to comment.