compressed mov audio fixed

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2420 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi
2001-10-23 13:55:49 +00:00
parent 9066ffe1e6
commit adfdd89012
3 changed files with 9 additions and 1 deletions
+5 -1
View File
@@ -548,10 +548,14 @@ int demux_mov_fill_buffer(demuxer_t *demuxer,demux_stream_t* ds){
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
+2
View File
@@ -39,6 +39,8 @@ demux_stream_t* new_demuxer_stream(struct demuxer_st *demuxer,int id){
//----------------
ds->asf_seq=-1;
ds->asf_packet=NULL;
//----------------
ds->ss_mul=ds->ss_div=1;
//----------------
ds->sh=NULL;
return ds;
+2
View File
@@ -50,6 +50,8 @@ typedef struct {
// ---- 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;