changeset 8638:1088ea188568 libavcodec

flacdec: add support for 3 additional sample rate codes
author jbr
date Thu, 22 Jan 2009 22:23:58 +0000
parents 3f72756b0c5c
children 29096719e684
files flac.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flac.c	Thu Jan 22 19:48:10 2009 +0000
+++ b/flac.c	Thu Jan 22 22:23:58 2009 +0000
@@ -76,7 +76,8 @@
 #define METADATA_TYPE_STREAMINFO 0
 
 static const int sample_rate_table[] =
-{ 0, 0, 0, 0,
+{ 0,
+  88200, 176400, 192000,
   8000, 16000, 22050, 24000, 32000, 44100, 48000, 96000,
   0, 0, 0, 0 };
 
@@ -558,7 +559,7 @@
 
     if (sample_rate_code == 0){
         samplerate= s->samplerate;
-    }else if ((sample_rate_code > 3) && (sample_rate_code < 12))
+    }else if (sample_rate_code < 12)
         samplerate = sample_rate_table[sample_rate_code];
     else if (sample_rate_code == 12)
         samplerate = get_bits(&s->gb, 8) * 1000;