aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar ranma <ranma@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-06-30 22:50:56 +0000
committerGravatar ranma <ranma@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-06-30 22:50:56 +0000
commitc95475b25208444d80276ef3237f47ea4db2f58b (patch)
tree6328f1920a58c865941ab6b3560adffdf4a62573
parentf6c7658fefca873c306c20e6ec115cd19e530bf4 (diff)
We still need to make sure the upper 16 bits of dwFlags are cleared
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12738 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libmpdemux/aviheader.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/libmpdemux/aviheader.c b/libmpdemux/aviheader.c
index 3a4034f601..f7cda06303 100644
--- a/libmpdemux/aviheader.c
+++ b/libmpdemux/aviheader.c
@@ -369,8 +369,16 @@ while(1){
priv->idx=malloc(priv->idx_size<<4);
// printf("\nindex to %p !!!!! (priv=%p)\n",priv->idx,priv);
stream_read(demuxer->stream,(char*)priv->idx,priv->idx_size<<4);
- for (i = 0; i < priv->idx_size; i++) // swap index to machine endian
- le2me_AVIINDEXENTRY((AVIINDEXENTRY*)priv->idx + i);
+ for (i = 0; i < priv->idx_size; i++) { // swap index to machine endian
+ AVIINDEXENTRY *entry=(AVIINDEXENTRY*)priv->idx + i;
+ le2me_AVIINDEXENTRY(entry);
+ /*
+ * We (ab)use the upper word for bits 32-47 of the offset, so
+ * we'll clear them here.
+ * FIXME: AFAIK no codec uses them, but if one does it will break
+ */
+ entry->dwFlags&=0xffff;
+ }
chunksize-=priv->idx_size<<4;
if(verbose>=2) print_index(priv->idx,priv->idx_size);
}