Just found this tidbit: http://skolk.livejournal.com/ -hpa
Hello! Why you don't check the SDI header checksum? May be my explanation isn't clear enough? http://skolk.livejournal.com/886.html do { unsigned char checksum=0; const unsigned char *cptr=ptr; int i=0x200; /* 512 */ #if 1 /* choose for your style ;) */ do { checksum += *cptr++; } while (--i); #else for (i=0;i<512;i++) checksum += cptr[i]; #endif if (checksum != 0 ) { fputs("Bad header checksum for SDI file\n", stdout); goto bail; } } while (0); Sergii