[Mplayer-cvslog] CVS: main/libmpdemux demux_mov.c,1.35,1.36
Alex Beregszaszi
alex at mplayer.dev.hu
Sun Feb 10 19:31:15 CET 2002
Update of /cvsroot/mplayer/main/libmpdemux
In directory mplayer:/var/tmp.root/cvs-serv15947
Modified Files:
demux_mov.c
Log Message:
added nmhd, added checking for audio trak in demux_mov_fill_buffer
Index: demux_mov.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_mov.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- demux_mov.c 10 Feb 2002 00:45:56 -0000 1.35
+++ demux_mov.c 10 Feb 2002 18:31:12 -0000 1.36
@@ -338,6 +338,11 @@
trak->type=MOV_TRAK_GENERIC;
break;
}
+ case MOV_FOURCC('n','m','h','d'): {
+ mp_msg(MSGT_DEMUX,MSGL_V,"MOV: %*sGeneric header!\n",level,"");
+ trak->type=MOV_TRAK_GENERIC;
+ break;
+ }
case MOV_FOURCC('s','t','s','d'): {
int i=stream_read_dword(demuxer->stream); // temp!
int count=stream_read_dword(demuxer->stream);
@@ -947,13 +952,16 @@
pts=(float)(trak->chunks[trak->pos].sample*trak->duration)/(float)trak->timescale;
if(trak->samplesize!=1)
{
- mp_msg(MSGT_DEMUX, MSGL_WARN, "WARNING! Samplesize(%d) != 1\n",
+ mp_msg(MSGT_DEMUX, MSGL_DBG2, "WARNING! Samplesize(%d) != 1\n",
trak->samplesize);
x=trak->chunks[trak->pos].size*trak->samplesize;
}
else
x=trak->chunks[trak->pos].size;
// printf("X = %d\n", x);
+ /* the following stuff is audio related */
+ if (trak->type == MOV_TRAK_AUDIO)
+ {
if(trak->stdata_len>=36 && trak->stdata[30] && trak->stdata[31]){
// extended stsd header - works for CBR MP3:
x/=(trak->stdata[30]<<8)+trak->stdata[31]; // samples/packet
@@ -967,6 +975,7 @@
x*=(trak->stdata[18]<<8)+trak->stdata[19];x/=8; // bits/sample
}
}
+ } /* MOV_TRAK_AUDIO */
ds_read_packet(ds,demuxer->stream,x,pts,trak->chunks[trak->pos].pos,0);
if(ds==demuxer->audio) mp_msg(MSGT_DEMUX, MSGL_DBG2, "sample %d bytes pts %5.3f\n",trak->chunks[trak->pos].size*trak->samplesize,pts);
} else {
More information about the MPlayer-cvslog
mailing list