diff options
author | ranma <ranma@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-04-30 20:36:48 +0000 |
---|---|---|
committer | ranma <ranma@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-04-30 20:36:48 +0000 |
commit | 4058e90588896d7ac1620fe7afc427e30b40463b (patch) | |
tree | d44ac9ede9d0a8388897c44314887bd031ee4624 /libmpdemux/aviheader.c | |
parent | cd7722e4ca3f6ba163af81c7ef5a5fb472fb11dc (diff) | |
download | mpv-4058e90588896d7ac1620fe7afc427e30b40463b.tar.bz2 mpv-4058e90588896d7ac1620fe7afc427e30b40463b.tar.xz |
Only use odml index for files that need it
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12363 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/aviheader.c')
-rw-r--r-- | libmpdemux/aviheader.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/libmpdemux/aviheader.c b/libmpdemux/aviheader.c index ff0efc4c94..75eb5c8193 100644 --- a/libmpdemux/aviheader.c +++ b/libmpdemux/aviheader.c @@ -225,9 +225,6 @@ while(1){ 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 @@ while(1){ (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 @@ while(1){ 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; } |