# HG changeset patch # User szabii # Date 986946998 0 # Node ID 901e7f28bb6057f85940e9057bbba3b6e009a205 # Parent 8bd3e3135e2355e52adbc50c11ed297627854c65 guid diff -r 8bd3e3135e23 -r 901e7f28bb60 codec-cfg.c --- a/codec-cfg.c Tue Apr 10 23:45:07 2001 +0000 +++ b/codec-cfg.c Tue Apr 10 23:56:38 2001 +0000 @@ -338,6 +338,7 @@ codecs_t *codec = NULL; // current codec codecs_t **codecsp = NULL;// points to audio_codecs or to video_codecs static codecs_t *ret_codecs[2] = {NULL,NULL}; + char *endptr; // strtoul()... int *nr_codecsp; int codec_type; /* TYPE_VIDEO/TYPE_AUDIO */ int tmp, i; @@ -454,15 +455,19 @@ } else if (!strcmp(token[0], "guid")) { if (get_token(11, 11) < 0) goto err_out_parse_error; -#warning GUID-nak szammal kell kezdodni!!!!!!!! ez igy ok? - for (i = 0; i < 11; i++) - if (!isdigit(*token[i])) + codec->guid.f1=strtoul(token[0],&endptr,0); + if (*endptr != '\0' && *endptr != ',') + goto err_out_parse_error; + codec->guid.f2=strtoul(token[1],&endptr,0); + if (*endptr != '\0' && *endptr != ',') + goto err_out_parse_error; + codec->guid.f3=strtoul(token[2],&endptr,0); + if (*endptr != '\0' && *endptr != ',') + goto err_out_parse_error; + for (i = 0; i < 8; i++) { + codec->guid.f4[i]=strtoul(token[i + 3],&endptr,0); + if (*endptr != '\0' && *endptr != ',') goto err_out_parse_error; - codec->guid.f1=strtoul(token[0],NULL,0); - codec->guid.f2=strtoul(token[1],NULL,0); - codec->guid.f3=strtoul(token[2],NULL,0); - for (i = 0; i < 8; i++) { - codec->guid.f4[i]=strtoul(token[i + 3],NULL,0); } } else if (!strcmp(token[0], "out")) { if (get_token(1, 2) < 0)