if (!cp) cp = strchr(arg, ':');
int parse_frame_rate(int *frame_rate, int *frame_rate_base, const char *arg){    int i;    char* cp;       /* First, we check our abbreviation table */    for (i = 0; i < sizeof(frame_abvs)/sizeof(*frame_abvs); ++i)         if (!strcmp(frame_abvs[i].abv, arg)) {	     *frame_rate = frame_abvs[i].frame_rate;	     *frame_rate_base = frame_abvs[i].frame_rate_base;	     return 0;	 }    /* Then, we try to parse it as fraction */    cp = strchr(arg, '/');    if (cp) {        char* cpp;	*frame_rate = strtol(arg, &cpp, 10);	if (cpp != arg || cpp == cp) 	    *frame_rate_base = strtol(cp+1, &cpp, 10);	else	   *frame_rate = 0;    }     else {        /* Finally we give up and parse it as double */        *frame_rate_base = DEFAULT_FRAME_RATE_BASE; //FIXME use av_d2q()        *frame_rate = (int)(strtod(arg, 0) * (*frame_rate_base) + 0.5);    }    if (!*frame_rate || !*frame_rate_base)        return -1;    else        return 0;}