changeset 11654:fe105c6d28c7 libavcodec

Set .supported_samplerates for mpeg audio encoders.
author michael
date Thu, 22 Apr 2010 09:41:45 +0000
parents 28638e0d6e63
children 7ad2eb6a2f10
files libmp3lame.c mpegaudioenc.c
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmp3lame.c	Wed Apr 21 18:01:34 2010 +0000
+++ b/libmp3lame.c	Thu Apr 22 09:41:45 2010 +0000
@@ -81,8 +81,8 @@
     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 @@
     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)"),
 };
--- a/mpegaudioenc.c	Wed Apr 21 18:01:34 2010 +0000
+++ b/mpegaudioenc.c	Thu Apr 22 09:41:45 2010 +0000
@@ -798,6 +798,7 @@
     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)"),
 };