[SCM] libav/experimental: flacdec: add support for 3 additional sample rate codes
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 16:35:48 UTC 2013
The following commit has been merged in the experimental branch:
commit 959e0006278fa2341c12026556088ecbb1f626d0
Author: Justin Ruggles <justin.ruggles at gmail.com>
Date: Thu Jan 22 22:23:58 2009 +0000
flacdec: add support for 3 additional sample rate codes
Originally committed as revision 16723 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavcodec/flac.c b/libavcodec/flac.c
index 4028507..30e58fb 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;
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list