[Mplayer-cvslog] CVS: main/libmpdemux aviheader.c,1.56,1.57
Tobias Diedrich CVS
syncmail at mplayerhq.hu
Fri Apr 30 22:36:51 CEST 2004
CVS change done by Tobias Diedrich CVS
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv8567
Modified Files:
aviheader.c
Log Message:
Only use odml index for files that need it
Index: aviheader.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/aviheader.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- aviheader.c 29 Apr 2004 06:27:30 -0000 1.56
+++ aviheader.c 30 Apr 2004 20:36:48 -0000 1.57
@@ -225,9 +225,6 @@
uint32_t i;
unsigned msize = 0;
avisuperindex_chunk *s;
- // FIXME: do not use odml index for files that don't need it.
- // apparently the odml code is buggy!
- if (demuxer->movi_end < 0x7fffffff) break;
priv->suidx_size++;
priv->suidx = realloc(priv->suidx, priv->suidx_size * sizeof (avisuperindex_chunk));
s = &priv->suidx[priv->suidx_size-1];
@@ -262,7 +259,6 @@
(s->dwChunkId), i,
(uint64_t)s->aIndex[i].qwOffset, s->aIndex[i].dwSize, s->aIndex[i].dwDuration);
}
- priv->isodml++;
break; }
case ckidSTREAMFORMAT: { // read 'strf'
@@ -401,6 +397,15 @@
if (strncmp(riff_type, "AVIX", sizeof riff_type))
mp_msg(MSGT_HEADER, MSGL_WARN,
"** warning: this is no extended AVI header..\n");
+ else {
+ /*
+ * We got an extended AVI header, so we need to switch to
+ * ODML to get seeking to work, provided we got indx chunks
+ * in the header (suidx_size > 0).
+ */
+ if (priv->suidx_size > 0)
+ priv->isodml = 1;
+ }
chunksize = 0;
list_end = 0; /* a new list will follow */
break; }
More information about the MPlayer-cvslog
mailing list