[Mplayer-cvslog] CVS: main/libmpdemux demux_mov.c,1.12,1.13 demuxer.c,1.36,1.37 demuxer.h,1.15,1.16

Arpi of Ize arpi at mplayer.dev.hu
Tue Oct 23 15:56:07 CEST 2001


Update of /cvsroot/mplayer/main/libmpdemux
In directory mplayer:/var/tmp.root/cvs-serv32235

Modified Files:
	demux_mov.c demuxer.c demuxer.h 
Log Message:
compressed mov audio fixed

Index: demux_mov.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_mov.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- demux_mov.c	22 Oct 2001 22:49:09 -0000	1.12
+++ demux_mov.c	23 Oct 2001 13:55:49 -0000	1.13
@@ -548,10 +548,14 @@
 
 if(trak->samplesize){
     // read chunk:
+    int x;
     if(trak->pos>=trak->chunks_size) return 0; // EOF
     stream_seek(demuxer->stream,trak->chunks[trak->pos].pos);
     pts=(float)(trak->chunks[trak->pos].sample*trak->duration)/(float)trak->timescale;
-    ds_read_packet(ds,demuxer->stream,trak->chunks[trak->pos].size*trak->samplesize,pts,trak->chunks[trak->pos].pos,0);
+    x=trak->chunks[trak->pos].size*trak->samplesize;
+    x/=ds->ss_div; x*=ds->ss_mul; // compression ratio fix
+    ds_read_packet(ds,demuxer->stream,x,pts,trak->chunks[trak->pos].pos,0);
+    if(ds==demuxer->audio) printf("sample %d bytes pts %5.3f\n",trak->chunks[trak->pos].size*trak->samplesize,pts);
 } else {
     // read sample:
     if(trak->pos>=trak->samples_size) return 0; // EOF

Index: demuxer.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demuxer.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- demuxer.c	21 Oct 2001 15:47:31 -0000	1.36
+++ demuxer.c	23 Oct 2001 13:55:49 -0000	1.37
@@ -40,6 +40,8 @@
   ds->asf_seq=-1;
   ds->asf_packet=NULL;
 //----------------
+  ds->ss_mul=ds->ss_div=1;
+//----------------
   ds->sh=NULL;
   return ds;
 }

Index: demuxer.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demuxer.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- demuxer.h	22 Aug 2001 23:54:57 -0000	1.15
+++ demuxer.h	23 Oct 2001 13:55:49 -0000	1.16
@@ -50,6 +50,8 @@
 // ---- asf -----
   demux_packet_t *asf_packet;  // read asf fragments here
   int asf_seq;
+// ---- mov -----
+  unsigned int ss_mul,ss_div;
 // ---- stream header ----
   void* sh;
 } demux_stream_t;




More information about the MPlayer-cvslog mailing list