changeset 2549:3e0204ff3be0

twos pcm audio support
author arpi
date Mon, 29 Oct 2001 22:41:54 +0000
parents 199d36d27171
children 7d6e5373fd68
files libmpdemux/demux_mov.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mov.c	Mon Oct 29 22:41:15 2001 +0000
+++ b/libmpdemux/demux_mov.c	Mon Oct 29 22:41:54 2001 +0000
@@ -749,9 +749,11 @@
 	x*=(trak->stdata[38]<<8)+trak->stdata[39];  // bytes/frame
     } else {
 	// works for ima4:   -- we should find this info in mov headers!
-	x/=ds->ss_div; x*=ds->ss_mul; // compression ratio fix  ! HACK !
-	// x*=(trak->stdata[18]<<8)+trak->stdata[19];x/=8;  // bits/sample
-	
+	if(ds->ss_div!=1 || ds->ss_mul!=1){
+	    x/=ds->ss_div; x*=ds->ss_mul; // compression ratio fix  ! HACK !
+	} else {
+	    x*=(trak->stdata[18]<<8)+trak->stdata[19];x/=8;  // bits/sample
+	}
     }
     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);