diff libmpdemux/demuxer.c @ 6871:88953ff93743

count blocks by rounded-up chunksizes instead of chunks - we need full emulation of dshow avi demuxer bugs :( fixes silly nandub-style a-v delaying in avi with vbr mp3...
author arpi
date Fri, 02 Aug 2002 17:44:16 +0000
parents f01e5cefb828
children 1a747aee653b
line wrap: on
line diff
--- a/libmpdemux/demuxer.c	Fri Aug 02 17:41:02 2002 +0000
+++ b/libmpdemux/demuxer.c	Fri Aug 02 17:44:16 2002 +0000
@@ -35,6 +35,7 @@
   ds->pos=0;
   ds->dpos=0;
   ds->pack_no=0;
+  ds->block_no=0;
 //---------------
   ds->packs=0;
   ds->bytes=0;
@@ -46,6 +47,7 @@
   ds->asf_packet=NULL;
 //----------------
   ds->ss_mul=ds->ss_div=1;
+  ds->block_size=1;
 //----------------
   ds->sh=NULL;
   return ds;
@@ -320,6 +322,7 @@
       ds->pos=p->pos;
       ds->dpos+=p->len; // !!!
       ++ds->pack_no;
+      ds->block_no+=(p->len+ds->block_size-1)/ds->block_size;
       if(p->pts){
         ds->pts=p->pts;
         ds->pts_bytes=0;