diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c index fe5b84dc7f..22962a396b 100644 --- a/libavcodec/aacenc.c +++ b/libavcodec/aacenc.c @@ -811,6 +811,13 @@ static const AVClass aacenc_class = { LIBAVUTIL_VERSION_INT, }; +/* duplicated from avpriv_mpeg4audio_sample_rates to avoid shared build + * failures */ +static const int mpeg4audio_sample_rates[16] = { + 96000, 88200, 64000, 48000, 44100, 32000, + 24000, 22050, 16000, 12000, 11025, 8000, 7350 +}; + AVCodec ff_aac_encoder = { .name = "aac", .type = AVMEDIA_TYPE_AUDIO, @@ -819,7 +826,7 @@ AVCodec ff_aac_encoder = { .init = aac_encode_init, .encode2 = aac_encode_frame, .close = aac_encode_end, - .supported_samplerates = avpriv_mpeg4audio_sample_rates, + .supported_samplerates = mpeg4audio_sample_rates, .capabilities = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY | CODEC_CAP_EXPERIMENTAL, .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP, diff --git a/libavcodec/libvo-aacenc.c b/libavcodec/libvo-aacenc.c index 3b7aca7386..a09c74c72d 100644 --- a/libavcodec/libvo-aacenc.c +++ b/libavcodec/libvo-aacenc.c @@ -185,6 +185,13 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, return 0; } +/* duplicated from avpriv_mpeg4audio_sample_rates to avoid shared build + * failures */ +static const int mpeg4audio_sample_rates[16] = { + 96000, 88200, 64000, 48000, 44100, 32000, + 24000, 22050, 16000, 12000, 11025, 8000, 7350 +}; + AVCodec ff_libvo_aacenc_encoder = { .name = "libvo_aacenc", .type = AVMEDIA_TYPE_AUDIO, @@ -193,7 +200,7 @@ AVCodec ff_libvo_aacenc_encoder = { .init = aac_encode_init, .encode2 = aac_encode_frame, .close = aac_encode_close, - .supported_samplerates = avpriv_mpeg4audio_sample_rates, + .supported_samplerates = mpeg4audio_sample_rates, .capabilities = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY, .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE }, diff --git a/libavcodec/mpeg4audio.c b/libavcodec/mpeg4audio.c index 3066954286..8aa3219207 100644 --- a/libavcodec/mpeg4audio.c +++ b/libavcodec/mpeg4audio.c @@ -52,6 +52,8 @@ static int parse_config_ALS(GetBitContext *gb, MPEG4AudioConfig *c) return 0; } +/* XXX: make sure to update the copies in the different encoders if you change + * this table */ const int avpriv_mpeg4audio_sample_rates[16] = { 96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350