diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-04-22 09:41:45 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-04-22 09:41:45 +0000 |
commit | ddecab2097e7c38eb0ef1a1cbd0f6465e8dbd1c3 (patch) | |
tree | 677a143087ee831890b4d4277a0d2564c341e5b8 /libavcodec | |
parent | 10d0f5e0352a8794a3e2bc657b5bd6e11ef0dfb9 (diff) | |
download | ffmpeg-ddecab2097e7c38eb0ef1a1cbd0f6465e8dbd1c3.tar.gz |
Set .supported_samplerates for mpeg audio encoders.
Originally committed as revision 22944 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/libmp3lame.c | 5 | ||||
-rw-r--r-- | libavcodec/mpegaudioenc.c | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c index 1bbb8dae35..1d74d6d59d 100644 --- a/libavcodec/libmp3lame.c +++ b/libavcodec/libmp3lame.c @@ -81,8 +81,8 @@ err: return -1; } -static const int sSampleRates[3] = { - 44100, 48000, 32000 +static const int sSampleRates[] = { + 44100, 48000, 32000, 22050, 24000, 16000, 11025, 12000, 8000, 0 }; static const int sBitRates[2][3][15] = { @@ -224,5 +224,6 @@ AVCodec libmp3lame_encoder = { MP3lame_encode_close, .capabilities= CODEC_CAP_DELAY, .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE}, + .supported_samplerates= sSampleRates, .long_name= NULL_IF_CONFIG_SMALL("libmp3lame MP3 (MPEG audio layer 3)"), }; diff --git a/libavcodec/mpegaudioenc.c b/libavcodec/mpegaudioenc.c index 70f76e87c2..264175ecc5 100644 --- a/libavcodec/mpegaudioenc.c +++ b/libavcodec/mpegaudioenc.c @@ -798,6 +798,7 @@ AVCodec mp2_encoder = { MPA_encode_close, NULL, .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE}, + .supported_samplerates= (const int[]){44100, 48000, 32000, 22050, 24000, 16000, 0}, .long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"), }; |