# HG changeset patch # User albeu # Date 1143660691 0 # Node ID 5f9f5c2867167ec337e2014a1e9b178b0c8fa4e9 # Parent a9e0c9e0cb70aea23c32ec27b9e231baa026a936 100L to who wrote this. Also fix broken headers while at it. diff -r a9e0c9e0cb70 -r 5f9f5c286716 libmpdemux/aviheader.c --- a/libmpdemux/aviheader.c Wed Mar 29 11:33:13 2006 +0000 +++ b/libmpdemux/aviheader.c Wed Mar 29 19:31:31 2006 +0000 @@ -225,7 +225,12 @@ print_avisuperindex_chunk(s,MSGL_V); - msize = sizeof (uint32_t) * s->wLongsPerEntry * s->nEntriesInUse; + // Check and fix this useless crap + if(s->wLongsPerEntry != sizeof (avisuperindex_entry)/4) { + mp_msg (MSGT_HEADER, MSGL_WARN, "Broken super index chunk size: %u\n",s->wLongsPerEntry); + s->wLongsPerEntry = sizeof(avisuperindex_entry)/4; + } + msize = sizeof (avisuperindex_entry) * s->nEntriesInUse; s->aIndex = malloc(msize); memset (s->aIndex, 0, msize); s->stdidx = malloc (s->nEntriesInUse * sizeof (avistdindex_chunk));