# HG changeset patch # User arpi # Date 1003845349 0 # Node ID 24ba3dfb8e89154a09b71db31d15e7d4c0c43b25 # Parent eab58e827cf720256d79685522a27c5200b015be compressed mov audio fixed diff -r eab58e827cf7 -r 24ba3dfb8e89 libmpdemux/demux_mov.c --- a/libmpdemux/demux_mov.c Tue Oct 23 13:05:23 2001 +0000 +++ b/libmpdemux/demux_mov.c Tue Oct 23 13:55:49 2001 +0000 @@ -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 diff -r eab58e827cf7 -r 24ba3dfb8e89 libmpdemux/demuxer.c --- a/libmpdemux/demuxer.c Tue Oct 23 13:05:23 2001 +0000 +++ b/libmpdemux/demuxer.c Tue Oct 23 13:55:49 2001 +0000 @@ -40,6 +40,8 @@ ds->asf_seq=-1; ds->asf_packet=NULL; //---------------- + ds->ss_mul=ds->ss_div=1; +//---------------- ds->sh=NULL; return ds; } diff -r eab58e827cf7 -r 24ba3dfb8e89 libmpdemux/demuxer.h --- a/libmpdemux/demuxer.h Tue Oct 23 13:05:23 2001 +0000 +++ b/libmpdemux/demuxer.h Tue Oct 23 13:55:49 2001 +0000 @@ -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;