diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2008-04-02 21:41:48 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2008-04-02 21:41:48 +0000 |
commit | 7bfacd4e75a773c2cdf8ce81bed5aeff9a698140 (patch) | |
tree | 0d7117e6f241ea0411bc52dde2253e3b5b4dbea8 /libavformat/matroskaenc.c | |
parent | b2fec0fc2574872c80c3cb3a700f3f58d1f302d2 (diff) | |
download | ffmpeg-7bfacd4e75a773c2cdf8ce81bed5aeff9a698140.tar.gz |
use common aac sample rate tables
Originally committed as revision 12671 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r-- | libavformat/matroskaenc.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 44465a33be..f5729e48c6 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -25,6 +25,7 @@ #include "xiph.h" #include "matroska.h" #include "avc.h" +#include "libavcodec/mpeg4audio.h" typedef struct ebml_master { offset_t pos; ///< absolute offset in the file where the master's elements start @@ -438,10 +439,6 @@ static int put_flac_codecpriv(AVFormatContext *s, ByteIOContext *pb, AVCodecCont static void get_aac_sample_rates(AVFormatContext *s, AVCodecContext *codec, int *sample_rate, int *output_sample_rate) { - static const int aac_sample_rates[] = { - 96000, 88200, 64000, 48000, 44100, 32000, - 24000, 22050, 16000, 12000, 11025, 8000, - }; int sri; if (codec->extradata_size < 2) { @@ -454,7 +451,7 @@ static void get_aac_sample_rates(AVFormatContext *s, AVCodecContext *codec, int av_log(s, AV_LOG_WARNING, "AAC samplerate index out of bounds\n"); return; } - *sample_rate = aac_sample_rates[sri]; + *sample_rate = ff_mpeg4audio_sample_rates[sri]; // if sbr, get output sample rate as well if (codec->extradata_size == 5) { @@ -463,7 +460,7 @@ static void get_aac_sample_rates(AVFormatContext *s, AVCodecContext *codec, int av_log(s, AV_LOG_WARNING, "AAC output samplerate index out of bounds\n"); return; } - *output_sample_rate = aac_sample_rates[sri]; + *output_sample_rate = ff_mpeg4audio_sample_rates[sri]; } } |