# HG changeset patch # User arpi_esp # Date 992988439 0 # Node ID 95f6f14176c68c2cb7f27d01116d0cd5dffba87f # Parent 35d687605d2bb4502017c82515308b0ea06e45f2 fr->sampling_frequency limitation (thanx to pl ) diff -r 35d687605d2b -r 95f6f14176c6 mp3lib/sr1.c --- a/mp3lib/sr1.c Tue Jun 19 22:03:05 2001 +0000 +++ b/mp3lib/sr1.c Tue Jun 19 22:07:19 2001 +0000 @@ -196,6 +196,8 @@ else fr->sampling_frequency = ((newhead>>10)&0x3) + (fr->lsf*3); + if(fr->sampling_frequency>8) return FALSE; // valid: 0..8 + fr->error_protection = ((newhead>>16)&0x1)^0x1; fr->bitrate_index = ((newhead>>12)&0xf); fr->padding = ((newhead>>9)&0x1);