This is a patch to gop_fixup to avoid an assertion that occurs when the input MPEG 2 has a sequence header with a bad frame rate value. I've found this to be useful when trying to master DVDs with dvdauthor from files encoded by a Hauppauge WinTV PVR 250/350 card using the IVTV driver (for instance, with MythTV), after removing commercials with gopchop. Eric Smith 9-Jan-2005 http://mlug.missouri.edu/~markrages/software/gop_fixup/ http://outflux.net/unix/software/GOPchop/ http://ivtv.sourceforge.net/ http://205.209.168.201/~ckennedy/ivtv/ http://www.mythtv.org/ http://dvdauthor.sourceforge.net/ --- gop_fixup.c~ 2004-05-12 14:30:57.000000000 -0700 +++ gop_fixup.c 2005-01-09 14:00:27.327293554 -0800 @@ -148,18 +148,21 @@ break; case SEQUENCE_HEADER_CODE: fr_index=mem[fpos+4+3]&0xf; - assert(fr_index<10); - new_framerate=frameratetab[fr_index]; - if (framerate) { - if (framerate!=new_framerate) { - printf("Segments in stream have mismatched framerates.\n"); - printf("%d != %d\n",framerate,new_framerate); - printf("Whatever, continuing...\n"); - //exit(1); - } + if (fr_index >= 10) { + printf ("bad framerate index %d, ignoring.\n", fr_index); } else { - framerate=new_framerate; - printf("Found sequence with nominal framerate %d\n",framerate); + new_framerate=frameratetab[fr_index]; + if (framerate) { + if (framerate!=new_framerate) { + printf("Segments in stream have mismatched framerates.\n"); + printf("%d != %d\n",framerate,new_framerate); + printf("Whatever, continuing...\n"); + //exit(1); + } + } else { + framerate=new_framerate; + printf("Found sequence with nominal framerate %d\n",framerate); + } } break; case GROUP_START_CODE: