[MPlayer-dev-eng] [PATCH] support run command with specific osd_level
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Wed Jan 30 11:47:59 CET 2008
Hello,
On Mon, Jan 28, 2008 at 08:51:36PM +0800, Ulion wrote:
> patch 2: support run command with specific osd level, need apply patch 1 first.
That one IMO is overcomplicated, I think you do more checking than makes
sense.
I think it should be something like (note, this just illustrates the
idea, it probably is buggy):
if (strncmp(...)) {
str += 10;
osd = strtol(str, &str, 0);
if (*str != ' ')
return NULL;
str++;
}
The reason for this is just that it is pointless to check for all these
cases of incorrect syntax when you do not handle the error case
correctly anyway! Even more so if like this you limit the osd level to 9
without a good reason.
Greetings,
Reimar Döffinger
More information about the MPlayer-dev-eng
mailing list