changeset 22464:ba459e2e1187

Fix audio samplerates below 7000 Hz. Patch from John Koleszar, jkoleszar on2 com
author uau
date Wed, 07 Mar 2007 01:23:37 +0000
parents 979b2aa16e80
children e979a71e0bcd
files libmpdemux/demux_mov.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mov.c	Tue Mar 06 22:53:52 2007 +0000
+++ b/libmpdemux/demux_mov.c	Wed Mar 07 01:23:37 2007 +0000
@@ -740,7 +740,7 @@
 		    trak->durmap[0].num, trak->timescale/trak->durmap[0].dur,
 		    char2short(trak->stdata,24)/trak->durmap[0].dur);*/
 		sh->samplerate=char2short(trak->stdata,24);
-		if((sh->samplerate < 7000) && trak->durmap) {
+		if((sh->samplerate < 7000) && trak->durmap && trak->durmap[0].dur > 1) {
 		  switch(char2short(trak->stdata,24)/trak->durmap[0].dur) {
 		    // TODO: add more cases.
 		    case 31: