diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2009-01-22 22:23:58 +0000 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2009-01-22 22:23:58 +0000 |
commit | 959e0006278fa2341c12026556088ecbb1f626d0 (patch) | |
tree | e818698a2c5c0a213938b6e0064cac22c8c76316 /libavcodec/flac.c | |
parent | 3c4ea6d5ab8f736a95b1141ff2d03c5a1854eb88 (diff) | |
download | ffmpeg-959e0006278fa2341c12026556088ecbb1f626d0.tar.gz |
flacdec: add support for 3 additional sample rate codes
Originally committed as revision 16723 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/flac.c')
-rw-r--r-- | libavcodec/flac.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/flac.c b/libavcodec/flac.c index 4028507e0d..30e58fbce6 100644 --- a/libavcodec/flac.c +++ b/libavcodec/flac.c @@ -76,7 +76,8 @@ typedef struct FLACContext { #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 @@ static int decode_frame(FLACContext *s, int alloc_data_size) 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; |