Mercurial > mplayer.hg
comparison codec-cfg.c @ 335:901e7f28bb60
guid
author | szabii |
---|---|
date | Tue, 10 Apr 2001 23:56:38 +0000 |
parents | a5c6f9d536dd |
children | 3e0c68209600 |
comparison
equal
deleted
inserted
replaced
334:8bd3e3135e23 | 335:901e7f28bb60 |
---|---|
336 codecs_t **parse_codec_cfg(char *cfgfile) | 336 codecs_t **parse_codec_cfg(char *cfgfile) |
337 { | 337 { |
338 codecs_t *codec = NULL; // current codec | 338 codecs_t *codec = NULL; // current codec |
339 codecs_t **codecsp = NULL;// points to audio_codecs or to video_codecs | 339 codecs_t **codecsp = NULL;// points to audio_codecs or to video_codecs |
340 static codecs_t *ret_codecs[2] = {NULL,NULL}; | 340 static codecs_t *ret_codecs[2] = {NULL,NULL}; |
341 char *endptr; // strtoul()... | |
341 int *nr_codecsp; | 342 int *nr_codecsp; |
342 int codec_type; /* TYPE_VIDEO/TYPE_AUDIO */ | 343 int codec_type; /* TYPE_VIDEO/TYPE_AUDIO */ |
343 int tmp, i; | 344 int tmp, i; |
344 | 345 |
345 #ifdef DEBUG | 346 #ifdef DEBUG |
452 goto err_out; | 453 goto err_out; |
453 } | 454 } |
454 } else if (!strcmp(token[0], "guid")) { | 455 } else if (!strcmp(token[0], "guid")) { |
455 if (get_token(11, 11) < 0) | 456 if (get_token(11, 11) < 0) |
456 goto err_out_parse_error; | 457 goto err_out_parse_error; |
457 #warning GUID-nak szammal kell kezdodni!!!!!!!! ez igy ok? | 458 codec->guid.f1=strtoul(token[0],&endptr,0); |
458 for (i = 0; i < 11; i++) | 459 if (*endptr != '\0' && *endptr != ',') |
459 if (!isdigit(*token[i])) | 460 goto err_out_parse_error; |
461 codec->guid.f2=strtoul(token[1],&endptr,0); | |
462 if (*endptr != '\0' && *endptr != ',') | |
463 goto err_out_parse_error; | |
464 codec->guid.f3=strtoul(token[2],&endptr,0); | |
465 if (*endptr != '\0' && *endptr != ',') | |
466 goto err_out_parse_error; | |
467 for (i = 0; i < 8; i++) { | |
468 codec->guid.f4[i]=strtoul(token[i + 3],&endptr,0); | |
469 if (*endptr != '\0' && *endptr != ',') | |
460 goto err_out_parse_error; | 470 goto err_out_parse_error; |
461 codec->guid.f1=strtoul(token[0],NULL,0); | |
462 codec->guid.f2=strtoul(token[1],NULL,0); | |
463 codec->guid.f3=strtoul(token[2],NULL,0); | |
464 for (i = 0; i < 8; i++) { | |
465 codec->guid.f4[i]=strtoul(token[i + 3],NULL,0); | |
466 } | 471 } |
467 } else if (!strcmp(token[0], "out")) { | 472 } else if (!strcmp(token[0], "out")) { |
468 if (get_token(1, 2) < 0) | 473 if (get_token(1, 2) < 0) |
469 goto err_out_parse_error; | 474 goto err_out_parse_error; |
470 if (!add_to_out(token[0], token[1], codec->outfmt, | 475 if (!add_to_out(token[0], token[1], codec->outfmt, |