[MPlayer-dev-eng] [PATCH] support run command with specific osd_level
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Jan 31 15:03:43 CET 2008
Hello,
While I do not exactly object to it, I think you are introducing an
inconsistency with this:
On Wed, Jan 30, 2008 at 09:51:50PM +0800, Ulion wrote:
> @@ -754,6 +755,17 @@
> while (str[0] == ' ' || str[0] == '\t')
> ++str;
>
> + if (strncmp(str, "osd_level ", 10) == 0) {
> + str += 10;
> + osd = strtol(str, &str, 10);
> + if (str[0] != ' ' && str[0] != '\t')
> + return NULL;
> + do {
> + ++str;
> + }
> + while (str[0] == ' ' || str[0] == '\t');
> + }
> +
> if (strncmp(str, "pausing ", 8) == 0) {
Neither for the pausing prefix nor for any other case will the parser
accept multiple spaces or even a single tab in-between, only the leading
tabs/spaces are stripped (the reason being to allow to write the key ->
command mapping in a table-like way).
IMHO if allowing more than just a single space as separators within the
command is desired, it would make much more sense to implement it
consistently for all cases, i.e. after the pausing prefix, before and
in-between the arguments etc., but that would be non-trivial.
More information about the MPlayer-dev-eng
mailing list