[FFmpeg-cvslog] r22944 - in trunk/libavcodec: libmp3lame.c mpegaudioenc.c

michael subversion
Thu Apr 22 11:41:45 CEST 2010


Author: michael
Date: Thu Apr 22 11:41:45 2010
New Revision: 22944

Log:
Set .supported_samplerates for mpeg audio encoders.

Modified:
   trunk/libavcodec/libmp3lame.c
   trunk/libavcodec/mpegaudioenc.c

Modified: trunk/libavcodec/libmp3lame.c
==============================================================================
--- trunk/libavcodec/libmp3lame.c	Thu Apr 22 11:40:51 2010	(r22943)
+++ trunk/libavcodec/libmp3lame.c	Thu Apr 22 11:41:45 2010	(r22944)
@@ -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)"),
 };

Modified: trunk/libavcodec/mpegaudioenc.c
==============================================================================
--- trunk/libavcodec/mpegaudioenc.c	Thu Apr 22 11:40:51 2010	(r22943)
+++ trunk/libavcodec/mpegaudioenc.c	Thu Apr 22 11:41:45 2010	(r22944)
@@ -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)"),
 };
 



More information about the ffmpeg-cvslog mailing list