Mercurial > mplayer.hg
changeset 2419:24ba3dfb8e89
compressed mov audio fixed
author | arpi |
---|---|
date | Tue, 23 Oct 2001 13:55:49 +0000 |
parents | eab58e827cf7 |
children | 311676805f20 |
files | libmpdemux/demux_mov.c libmpdemux/demuxer.c libmpdemux/demuxer.h |
diffstat | 3 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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; }
--- 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;