diff -urN dvdauthor-0.6.5/src/dvdcli.c dvdauthor-0.6.5-new/src/dvdcli.c --- dvdauthor-0.6.5/src/dvdcli.c Tue Nov 4 20:58:27 2003 +++ dvdauthor-0.6.5-new/src/dvdcli.c Thu Nov 6 20:54:42 2003 @@ -304,6 +304,8 @@ usedtocflag=0; // whether the 'istoc' value has been used or not struct pgc *curpgc=0,*fpc=0; struct vob *curvob=0; + 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'}, @@ -373,9 +375,15 @@ case 'm': FLUSHPGC; + 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 hadchapter=0; curva=0; + inmenu=1; break; case 't': @@ -383,6 +391,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; + } FLUSHPGC; usedtocflag=1; hadchapter=0; @@ -452,6 +465,7 @@ vob_add_chapter(curvob,0); pgc_add_vob(curpgc,curvob); curvob=0; + inmenu=0; break; case 'C': optarg=0;