--- dvdauthor-338/src/ifogen.c Thu Jun 5 22:02:18 2003 +++ dvdauthor-338-devel/src/ifogen.c Thu Sep 11 20:33:14 2003 @@ -2698,6 +2698,8 @@ char *fbase=0; int curva=1,hadchapter=0,istoc=0,l, usedtocflag=0; // whether the 'istoc' value has been used or not + int inmenu=0; // lets us know if an mpeg file is required before we + // can start another major thingy. #ifdef HAVE_GETOPT_LONG static struct option longopts[]={ {"video",1,0,'v'}, @@ -2757,10 +2759,16 @@ fprintf(stderr,"ERR: already specified menu or title\n"); return 1; } + if (inmenu) + { + fprintf(stderr,"ERR: You must define the menu movie before another menu!\n"); + return 1; + } usedtocflag=1; // force -T to occur before -m va_addpgc(&va[0]); hadchapter=0; curva=0; + inmenu=1; break; case 't': @@ -2768,6 +2776,11 @@ fprintf(stderr,"ERR: TOC cannot have titles\n"); return 1; } + if (inmenu) + { + fprintf(stderr,"ERR: You must define the menu movie before the title!\n"); + return 1; + } usedtocflag=1; va_addpgc(&va[1]); hadchapter=0; @@ -2819,6 +2832,7 @@ MAINDEFPGC; + inmenu=0; // signal we have a video file. c=&vc->pgcs[vc->numpgcs-1]; if( !c->numsources || c->sources[c->numsources-1].fname!=0 ) { c->sources=(struct source *)realloc(c->sources,(c->numsources+1)*sizeof(struct source));