--- dvdauthor-0.6.14.old/src/dvdifo.c +++ dvdauthor-0.6.14/src/dvdifo.c @@ -211,7 +211,8 @@ write4(buf+p+4,c->vi[i].sector); } } - write4(buf+p+8,c->vi[i-1].lastsector); + if (c->vi) + write4(buf+p+8,c->vi[i-1].lastsector); p+=12; } write4(buf+4,p-1); --- dvdauthor-0.6.14.old/src/dvdvob.c +++ dvdauthor-0.6.14/src/dvdvob.c @@ -1415,6 +1415,7 @@ s->cells[k].scellid=v; if( lastcellid!=v && + ((v >= 0) && (v < s->vob->numvobus)) && s->vob->vi[v].firstIfield!=0) { fprintf(stderr,"WARN: GOP may not be closed on cell %d of source %s of pgc %d\n",k+1,s->fname,i+1); } @@ -1434,6 +1435,10 @@ for( i=0; inumvobs; i++ ) { int cellvobu=0; int cellid=0; + if (!va->vobs[i]) + continue; + else if (!va->vobs[i]->vi) + continue; va->vobs[i]->vi[0].vobcellid=1; for( j=0; jvobs[i]->numvobus; j++ ) { struct vobuinfo *v=&va->vobs[i]->vi[j];