diff options
author | arpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-06-19 22:07:19 +0000 |
---|---|---|
committer | arpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-06-19 22:07:19 +0000 |
commit | 6c8b41d71ae4bdbef99ba136ed6e880b82a0ef37 (patch) | |
tree | e6ed80084d3379210edc2b1c95f701b500ba966c /mp3lib/sr1.c | |
parent | 7b3bfd129c93c61651bb6cc04eb04fc46d0fdca4 (diff) | |
download | mpv-6c8b41d71ae4bdbef99ba136ed6e880b82a0ef37.tar.bz2 mpv-6c8b41d71ae4bdbef99ba136ed6e880b82a0ef37.tar.xz |
fr->sampling_frequency limitation (thanx to pl <p_l@tfz.net>)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1167 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mp3lib/sr1.c')
-rw-r--r-- | mp3lib/sr1.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mp3lib/sr1.c b/mp3lib/sr1.c index b90bb16de1..146e12f9f3 100644 --- a/mp3lib/sr1.c +++ b/mp3lib/sr1.c @@ -196,6 +196,8 @@ LOCAL int decode_header(struct frame *fr,unsigned long newhead){ 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); |