changeset 8061:dc7565b29e0a

fix possible sig8 - found by Alex
author arpi
date Sat, 02 Nov 2002 22:39:02 +0000
parents af1cf8a7e9d2
children ed2d3e7e7e36
files libmpdemux/demux_mov.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mov.c	Sat Nov 02 21:54:08 2002 +0000
+++ b/libmpdemux/demux_mov.c	Sat Nov 02 22:39:02 2002 +0000
@@ -865,7 +865,7 @@
 		sh->wf->wBitsPerSample=(trak->stdata[18]<<8)+trak->stdata[19];
 		// sh->wf->nSamplesPerSec=trak->timescale;
 		sh->wf->nSamplesPerSec=(trak->stdata[24]<<8)+trak->stdata[25];
-		if(trak->stdata_len >= 44 && trak->stdata[9]>=1){
+		if(trak->stdata_len >= 44 && trak->stdata[9]>=1 && char2int(trak->stdata,28)>0){
 		//Audio header: samp/pack=4096 bytes/pack=743 bytes/frame=1486 bytes/samp=2
 		  sh->wf->nAvgBytesPerSec=(sh->wf->nChannels*sh->wf->nSamplesPerSec*
 		      char2int(trak->stdata,32)+char2int(trak->stdata,28)/2)