Mercurial > mplayer.hg
comparison libmpdemux/aviheader.c @ 12736:45d1c8f0772d
Remove borken index fixup (breaks more than it fixes)
author | ranma |
---|---|
date | Wed, 30 Jun 2004 22:29:23 +0000 |
parents | 5369a905c5a5 |
children | ac56419ba6db |
comparison
equal
deleted
inserted
replaced
12735:5af0b22d55a6 | 12736:45d1c8f0772d |
---|---|
371 stream_read(demuxer->stream,(char*)priv->idx,priv->idx_size<<4); | 371 stream_read(demuxer->stream,(char*)priv->idx,priv->idx_size<<4); |
372 for (i = 0; i < priv->idx_size; i++) // swap index to machine endian | 372 for (i = 0; i < priv->idx_size; i++) // swap index to machine endian |
373 le2me_AVIINDEXENTRY((AVIINDEXENTRY*)priv->idx + i); | 373 le2me_AVIINDEXENTRY((AVIINDEXENTRY*)priv->idx + i); |
374 chunksize-=priv->idx_size<<4; | 374 chunksize-=priv->idx_size<<4; |
375 if(verbose>=2) print_index(priv->idx,priv->idx_size); | 375 if(verbose>=2) print_index(priv->idx,priv->idx_size); |
376 /* | |
377 * Fixup index for files >4GB | |
378 */ | |
379 for (i = 0; i < priv->idx_size; i++) { | |
380 AVIINDEXENTRY *idx = (AVIINDEXENTRY*)priv->idx + i; | |
381 idx->dwFlags &= 0xffff; | |
382 if (idx->dwChunkOffset < last_off) { | |
383 mp_msg(MSGT_HEADER,MSGL_WARN,"Index offset going backwards (last=%08X, now=%08X), compensating...\n", last_off, idx->dwChunkOffset); | |
384 base += 0x100000000LL; | |
385 } | |
386 idx->dwFlags |= base >> 16; | |
387 last_off = idx->dwChunkOffset; | |
388 } | |
389 } | 376 } |
390 break; | 377 break; |
391 /* added May 2002 */ | 378 /* added May 2002 */ |
392 case mmioFOURCC('R','I','F','F'): { | 379 case mmioFOURCC('R','I','F','F'): { |
393 char riff_type[4]; | 380 char riff_type[4]; |