mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
avcodec/mpeg4audio: Unavpriv and deduplicate mpeg4audio_sample_rates
avpriv_mpeg4audio_sample_rates has a size of 64B and it is currently avpriv; a clone of it exists in aacenctab.h and from there it is inlined in aacenc.c (which also uses the avpriv version) and in the FLV muxer. This means that despite it being avpriv both libavformat as well as libavcodec have copies already. This situation is clearly suboptimal. Given the overhead of exporting symbols (for x64 Elf/Linux/GNU: 2x2B version, 2x24B .dynsym, 24B .rela.dyn, 8B .got, 4B hash + twice the size of the name (here 31B)) the object is unavprived, i.e. duplicated into libavformat when creating a shared build; but the duplicates in the AAC encoder and FLV muxer are removed. This involves splitting of the sample rate table into a file of its own; this allowed to break some spurious dependencies (e.g. both the AAC encoder as well as the Matroska demuxer actually don't need the mpeg4audio_get_config stuff). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
d82c91ba2f
commit
49bf94536f
@ -60,7 +60,7 @@ OBJS = ac3_parser.o \
|
|||||||
# subsystems
|
# subsystems
|
||||||
OBJS-$(CONFIG_AANDCTTABLES) += aandcttab.o
|
OBJS-$(CONFIG_AANDCTTABLES) += aandcttab.o
|
||||||
OBJS-$(CONFIG_AC3DSP) += ac3dsp.o ac3.o ac3tab.o
|
OBJS-$(CONFIG_AC3DSP) += ac3dsp.o ac3.o ac3tab.o
|
||||||
OBJS-$(CONFIG_ADTS_HEADER) += adts_header.o mpeg4audio.o
|
OBJS-$(CONFIG_ADTS_HEADER) += adts_header.o mpeg4audio_sample_rates.o
|
||||||
OBJS-$(CONFIG_AMF) += amfenc.o
|
OBJS-$(CONFIG_AMF) += amfenc.o
|
||||||
OBJS-$(CONFIG_AUDIO_FRAME_QUEUE) += audio_frame_queue.o
|
OBJS-$(CONFIG_AUDIO_FRAME_QUEUE) += audio_frame_queue.o
|
||||||
OBJS-$(CONFIG_ATSC_A53) += atsc_a53.o
|
OBJS-$(CONFIG_ATSC_A53) += atsc_a53.o
|
||||||
@ -124,7 +124,7 @@ OBJS-$(CONFIG_MPEGAUDIODSP) += mpegaudiodsp.o \
|
|||||||
mpegaudiodsp_fixed.o \
|
mpegaudiodsp_fixed.o \
|
||||||
mpegaudiodsp_float.o
|
mpegaudiodsp_float.o
|
||||||
OBJS-$(CONFIG_MPEGAUDIOHEADER) += mpegaudiodecheader.o mpegaudiodata.o
|
OBJS-$(CONFIG_MPEGAUDIOHEADER) += mpegaudiodecheader.o mpegaudiodata.o
|
||||||
OBJS-$(CONFIG_MPEG4AUDIO) += mpeg4audio.o
|
OBJS-$(CONFIG_MPEG4AUDIO) += mpeg4audio.o mpeg4audio_sample_rates.o
|
||||||
OBJS-$(CONFIG_MPEGVIDEO) += mpegvideo.o mpegvideodsp.o rl.o \
|
OBJS-$(CONFIG_MPEGVIDEO) += mpegvideo.o mpegvideodsp.o rl.o \
|
||||||
mpegvideo_motion.o mpegutils.o \
|
mpegvideo_motion.o mpegutils.o \
|
||||||
mpegvideodata.o mpegpicture.o
|
mpegvideodata.o mpegpicture.o
|
||||||
@ -173,7 +173,8 @@ OBJS-$(CONFIG_AAC_ENCODER) += aacenc.o aaccoder.o aacenctab.o \
|
|||||||
aacenc_tns.o \
|
aacenc_tns.o \
|
||||||
aacenc_ltp.o \
|
aacenc_ltp.o \
|
||||||
aacenc_pred.o \
|
aacenc_pred.o \
|
||||||
psymodel.o mpeg4audio.o kbdwin.o
|
psymodel.o kbdwin.o \
|
||||||
|
mpeg4audio_sample_rates.o
|
||||||
OBJS-$(CONFIG_AAC_MF_ENCODER) += mfenc.o mf_utils.o
|
OBJS-$(CONFIG_AAC_MF_ENCODER) += mfenc.o mf_utils.o
|
||||||
OBJS-$(CONFIG_AASC_DECODER) += aasc.o msrledec.o
|
OBJS-$(CONFIG_AASC_DECODER) += aasc.o msrledec.o
|
||||||
OBJS-$(CONFIG_AC3_DECODER) += ac3dec_float.o ac3dec_data.o ac3.o \
|
OBJS-$(CONFIG_AC3_DECODER) += ac3dec_float.o ac3dec_data.o ac3.o \
|
||||||
@ -992,17 +993,18 @@ SHLIBOBJS += log2_tab.o reverse.o
|
|||||||
OBJS-$(CONFIG_ISO_MEDIA) += mpegaudiodata.o
|
OBJS-$(CONFIG_ISO_MEDIA) += mpegaudiodata.o
|
||||||
|
|
||||||
OBJS-$(CONFIG_FITS_DEMUXER) += fits.o
|
OBJS-$(CONFIG_FITS_DEMUXER) += fits.o
|
||||||
OBJS-$(CONFIG_MATROSKA_DEMUXER) += mpeg4audio.o
|
|
||||||
OBJS-$(CONFIG_NUT_MUXER) += mpegaudiodata.o
|
OBJS-$(CONFIG_NUT_MUXER) += mpegaudiodata.o
|
||||||
OBJS-$(CONFIG_RTP_MUXER) += mpeg4audio.o
|
|
||||||
OBJS-$(CONFIG_TAK_DEMUXER) += tak.o
|
OBJS-$(CONFIG_TAK_DEMUXER) += tak.o
|
||||||
|
|
||||||
# libavformat dependencies for static builds
|
# libavformat dependencies for static builds
|
||||||
|
STLIBOBJS-$(CONFIG_FLV_MUXER) += mpeg4audio_sample_rates.o
|
||||||
STLIBOBJS-$(CONFIG_HLS_DEMUXER) += ac3_channel_layout_tab.o
|
STLIBOBJS-$(CONFIG_HLS_DEMUXER) += ac3_channel_layout_tab.o
|
||||||
|
STLIBOBJS-$(CONFIG_MATROSKA_DEMUXER) += mpeg4audio_sample_rates.o
|
||||||
STLIBOBJS-$(CONFIG_MOV_DEMUXER) += ac3_channel_layout_tab.o
|
STLIBOBJS-$(CONFIG_MOV_DEMUXER) += ac3_channel_layout_tab.o
|
||||||
STLIBOBJS-$(CONFIG_MXF_MUXER) += golomb.o
|
STLIBOBJS-$(CONFIG_MXF_MUXER) += golomb.o
|
||||||
STLIBOBJS-$(CONFIG_RTPDEC) += jpegtables.o
|
STLIBOBJS-$(CONFIG_RTPDEC) += jpegtables.o
|
||||||
STLIBOBJS-$(CONFIG_RTP_MUXER) += golomb.o jpegtables.o
|
STLIBOBJS-$(CONFIG_RTP_MUXER) += golomb.o jpegtables.o \
|
||||||
|
mpeg4audio_sample_rates.o
|
||||||
STLIBOBJS-$(CONFIG_SPDIF_MUXER) += dca_sample_rate_tab.o
|
STLIBOBJS-$(CONFIG_SPDIF_MUXER) += dca_sample_rate_tab.o
|
||||||
|
|
||||||
# libavfilter dependencies
|
# libavfilter dependencies
|
||||||
|
@ -998,7 +998,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
|
|||||||
|
|
||||||
/* Samplerate */
|
/* Samplerate */
|
||||||
for (i = 0; i < 16; i++)
|
for (i = 0; i < 16; i++)
|
||||||
if (avctx->sample_rate == avpriv_mpeg4audio_sample_rates[i])
|
if (avctx->sample_rate == ff_mpeg4audio_sample_rates[i])
|
||||||
break;
|
break;
|
||||||
s->samplerate_index = i;
|
s->samplerate_index = i;
|
||||||
ERROR_IF(s->samplerate_index == 16 ||
|
ERROR_IF(s->samplerate_index == 16 ||
|
||||||
@ -1143,7 +1143,7 @@ const AVCodec ff_aac_encoder = {
|
|||||||
.encode2 = aac_encode_frame,
|
.encode2 = aac_encode_frame,
|
||||||
.close = aac_encode_end,
|
.close = aac_encode_end,
|
||||||
.defaults = aac_encode_defaults,
|
.defaults = aac_encode_defaults,
|
||||||
.supported_samplerates = mpeg4audio_sample_rates,
|
.supported_samplerates = ff_mpeg4audio_sample_rates,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
.capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME | AV_CODEC_CAP_DELAY,
|
.capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME | AV_CODEC_CAP_DELAY,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
|
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
|
||||||
|
@ -81,13 +81,6 @@ static const uint8_t aac_chan_maps[AAC_MAX_CHANNELS][AAC_MAX_CHANNELS] = {
|
|||||||
{ 2, 0, 1, 6, 7, 4, 5, 3 },
|
{ 2, 0, 1, 6, 7, 4, 5, 3 },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* 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
|
|
||||||
};
|
|
||||||
|
|
||||||
/** bits needed to code codebook run value for long windows */
|
/** bits needed to code codebook run value for long windows */
|
||||||
static const uint8_t run_value_bits_long[64] = {
|
static const uint8_t run_value_bits_long[64] = {
|
||||||
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
|
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
|
||||||
|
@ -40,7 +40,7 @@ int ff_adts_header_parse(GetBitContext *gbc, AACADTSHeaderInfo *hdr)
|
|||||||
crc_abs = get_bits1(gbc); /* protection_absent */
|
crc_abs = get_bits1(gbc); /* protection_absent */
|
||||||
aot = get_bits(gbc, 2); /* profile_objecttype */
|
aot = get_bits(gbc, 2); /* profile_objecttype */
|
||||||
sr = get_bits(gbc, 4); /* sample_frequency_index */
|
sr = get_bits(gbc, 4); /* sample_frequency_index */
|
||||||
if (!avpriv_mpeg4audio_sample_rates[sr])
|
if (!ff_mpeg4audio_sample_rates[sr])
|
||||||
return AAC_AC3_PARSE_ERROR_SAMPLE_RATE;
|
return AAC_AC3_PARSE_ERROR_SAMPLE_RATE;
|
||||||
skip_bits1(gbc); /* private_bit */
|
skip_bits1(gbc); /* private_bit */
|
||||||
ch = get_bits(gbc, 3); /* channel_configuration */
|
ch = get_bits(gbc, 3); /* channel_configuration */
|
||||||
@ -63,7 +63,7 @@ int ff_adts_header_parse(GetBitContext *gbc, AACADTSHeaderInfo *hdr)
|
|||||||
hdr->crc_absent = crc_abs;
|
hdr->crc_absent = crc_abs;
|
||||||
hdr->num_aac_frames = rdb + 1;
|
hdr->num_aac_frames = rdb + 1;
|
||||||
hdr->sampling_index = sr;
|
hdr->sampling_index = sr;
|
||||||
hdr->sample_rate = avpriv_mpeg4audio_sample_rates[sr];
|
hdr->sample_rate = ff_mpeg4audio_sample_rates[sr];
|
||||||
hdr->samples = (rdb + 1) * 1024;
|
hdr->samples = (rdb + 1) * 1024;
|
||||||
hdr->bit_rate = size * 8 * hdr->sample_rate / hdr->samples;
|
hdr->bit_rate = size * 8 * hdr->sample_rate / hdr->samples;
|
||||||
hdr->frame_length = size;
|
hdr->frame_length = size;
|
||||||
|
@ -57,13 +57,6 @@ static int parse_config_ALS(GetBitContext *gb, MPEG4AudioConfig *c, void *logctx
|
|||||||
return 0;
|
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
|
|
||||||
};
|
|
||||||
|
|
||||||
const uint8_t ff_mpeg4audio_channels[14] = {
|
const uint8_t ff_mpeg4audio_channels[14] = {
|
||||||
0,
|
0,
|
||||||
1, // mono (1/0)
|
1, // mono (1/0)
|
||||||
@ -93,7 +86,7 @@ static inline int get_sample_rate(GetBitContext *gb, int *index)
|
|||||||
{
|
{
|
||||||
*index = get_bits(gb, 4);
|
*index = get_bits(gb, 4);
|
||||||
return *index == 0x0f ? get_bits(gb, 24) :
|
return *index == 0x0f ? get_bits(gb, 24) :
|
||||||
avpriv_mpeg4audio_sample_rates[*index];
|
ff_mpeg4audio_sample_rates[*index];
|
||||||
}
|
}
|
||||||
|
|
||||||
int ff_mpeg4audio_get_config_gb(MPEG4AudioConfig *c, GetBitContext *gb,
|
int ff_mpeg4audio_get_config_gb(MPEG4AudioConfig *c, GetBitContext *gb,
|
||||||
|
@ -27,7 +27,6 @@
|
|||||||
#include "libavutil/attributes.h"
|
#include "libavutil/attributes.h"
|
||||||
|
|
||||||
#include "get_bits.h"
|
#include "get_bits.h"
|
||||||
#include "internal.h"
|
|
||||||
#include "put_bits.h"
|
#include "put_bits.h"
|
||||||
|
|
||||||
typedef struct MPEG4AudioConfig {
|
typedef struct MPEG4AudioConfig {
|
||||||
@ -45,7 +44,7 @@ typedef struct MPEG4AudioConfig {
|
|||||||
int frame_length_short;
|
int frame_length_short;
|
||||||
} MPEG4AudioConfig;
|
} MPEG4AudioConfig;
|
||||||
|
|
||||||
extern av_export_avcodec const int avpriv_mpeg4audio_sample_rates[16];
|
extern const int ff_mpeg4audio_sample_rates[16];
|
||||||
extern const uint8_t ff_mpeg4audio_channels[14];
|
extern const uint8_t ff_mpeg4audio_channels[14];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
23
libavcodec/mpeg4audio_sample_rates.c
Normal file
23
libavcodec/mpeg4audio_sample_rates.c
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
* MPEG-4 Audio sample rates
|
||||||
|
* Copyright (c) 2008 Baptiste Coudurier <baptiste.coudurier@free.fr>
|
||||||
|
* Copyright (c) 2009 Alex Converse <alex.converse@gmail.com>
|
||||||
|
*
|
||||||
|
* This file is part of FFmpeg.
|
||||||
|
*
|
||||||
|
* FFmpeg is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FFmpeg is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with FFmpeg; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "mpeg4audio_sample_rates.h"
|
30
libavcodec/mpeg4audio_sample_rates.h
Normal file
30
libavcodec/mpeg4audio_sample_rates.h
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* MPEG-4 Audio sample rates
|
||||||
|
* Copyright (c) 2008 Baptiste Coudurier <baptiste.coudurier@free.fr>
|
||||||
|
* Copyright (c) 2009 Alex Converse <alex.converse@gmail.com>
|
||||||
|
*
|
||||||
|
* This file is part of FFmpeg.
|
||||||
|
*
|
||||||
|
* FFmpeg is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FFmpeg is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with FFmpeg; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef AVCODEC_MPEG4AUDIO_SAMPLE_RATES_H
|
||||||
|
#define AVCODEC_MPEG4AUDIO_SAMPLE_RATES_H
|
||||||
|
|
||||||
|
const int ff_mpeg4audio_sample_rates[16] = {
|
||||||
|
96000, 88200, 64000, 48000, 44100, 32000,
|
||||||
|
24000, 22050, 16000, 12000, 11025, 8000, 7350
|
||||||
|
};
|
||||||
|
#endif
|
@ -681,11 +681,14 @@ OBJS-$(CONFIG_LIBZMQ_PROTOCOL) += libzmq.o
|
|||||||
|
|
||||||
# Objects duplicated from other libraries for shared builds
|
# Objects duplicated from other libraries for shared builds
|
||||||
SHLIBOBJS += log2_tab.o
|
SHLIBOBJS += log2_tab.o
|
||||||
|
SHLIBOBJS-$(CONFIG_FLV_MUXER) += mpeg4audio_sample_rates.o
|
||||||
SHLIBOBJS-$(CONFIG_HLS_DEMUXER) += ac3_channel_layout_tab.o
|
SHLIBOBJS-$(CONFIG_HLS_DEMUXER) += ac3_channel_layout_tab.o
|
||||||
|
SHLIBOBJS-$(CONFIG_MATROSKA_DEMUXER) += mpeg4audio_sample_rates.o
|
||||||
SHLIBOBJS-$(CONFIG_MOV_DEMUXER) += ac3_channel_layout_tab.o
|
SHLIBOBJS-$(CONFIG_MOV_DEMUXER) += ac3_channel_layout_tab.o
|
||||||
SHLIBOBJS-$(CONFIG_MXF_MUXER) += golomb_tab.o
|
SHLIBOBJS-$(CONFIG_MXF_MUXER) += golomb_tab.o
|
||||||
SHLIBOBJS-$(CONFIG_RTPDEC) += jpegtables.o
|
SHLIBOBJS-$(CONFIG_RTPDEC) += jpegtables.o
|
||||||
SHLIBOBJS-$(CONFIG_RTP_MUXER) += golomb_tab.o jpegtables.o
|
SHLIBOBJS-$(CONFIG_RTP_MUXER) += golomb_tab.o jpegtables.o \
|
||||||
|
mpeg4audio_sample_rates.o
|
||||||
SHLIBOBJS-$(CONFIG_SPDIF_MUXER) += dca_sample_rate_tab.o
|
SHLIBOBJS-$(CONFIG_SPDIF_MUXER) += dca_sample_rate_tab.o
|
||||||
|
|
||||||
# libavdevice dependencies
|
# libavdevice dependencies
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "libavutil/intfloat.h"
|
#include "libavutil/intfloat.h"
|
||||||
#include "libavutil/avassert.h"
|
#include "libavutil/avassert.h"
|
||||||
#include "libavutil/mathematics.h"
|
#include "libavutil/mathematics.h"
|
||||||
|
#include "libavcodec/mpeg4audio.h"
|
||||||
#include "avio_internal.h"
|
#include "avio_internal.h"
|
||||||
#include "avio.h"
|
#include "avio.h"
|
||||||
#include "avc.h"
|
#include "avc.h"
|
||||||
@ -33,7 +34,6 @@
|
|||||||
#include "metadata.h"
|
#include "metadata.h"
|
||||||
#include "libavutil/opt.h"
|
#include "libavutil/opt.h"
|
||||||
#include "libavcodec/put_bits.h"
|
#include "libavcodec/put_bits.h"
|
||||||
#include "libavcodec/aacenctab.h"
|
|
||||||
|
|
||||||
|
|
||||||
static const AVCodecTag flv_video_codec_ids[] = {
|
static const AVCodecTag flv_video_codec_ids[] = {
|
||||||
@ -514,7 +514,7 @@ static void flv_write_codec_header(AVFormatContext* s, AVCodecParameters* par, i
|
|||||||
for (samplerate_index = 0; samplerate_index < 16;
|
for (samplerate_index = 0; samplerate_index < 16;
|
||||||
samplerate_index++)
|
samplerate_index++)
|
||||||
if (flv->audio_par->sample_rate
|
if (flv->audio_par->sample_rate
|
||||||
== mpeg4audio_sample_rates[samplerate_index])
|
== ff_mpeg4audio_sample_rates[samplerate_index])
|
||||||
break;
|
break;
|
||||||
|
|
||||||
init_put_bits(&pbc, data, sizeof(data));
|
init_put_bits(&pbc, data, sizeof(data));
|
||||||
|
@ -2029,8 +2029,8 @@ static int matroska_aac_sri(int samplerate)
|
|||||||
{
|
{
|
||||||
int sri;
|
int sri;
|
||||||
|
|
||||||
for (sri = 0; sri < FF_ARRAY_ELEMS(avpriv_mpeg4audio_sample_rates); sri++)
|
for (sri = 0; sri < FF_ARRAY_ELEMS(ff_mpeg4audio_sample_rates); sri++)
|
||||||
if (avpriv_mpeg4audio_sample_rates[sri] == samplerate)
|
if (ff_mpeg4audio_sample_rates[sri] == samplerate)
|
||||||
break;
|
break;
|
||||||
return sri;
|
return sri;
|
||||||
}
|
}
|
||||||
|
23
libavformat/mpeg4audio_sample_rates.c
Normal file
23
libavformat/mpeg4audio_sample_rates.c
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
* MPEG-4 Audio sample rates
|
||||||
|
* Copyright (c) 2008 Baptiste Coudurier <baptiste.coudurier@free.fr>
|
||||||
|
* Copyright (c) 2009 Alex Converse <alex.converse@gmail.com>
|
||||||
|
*
|
||||||
|
* This file is part of FFmpeg.
|
||||||
|
*
|
||||||
|
* FFmpeg is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FFmpeg is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with FFmpeg; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "libavcodec/mpeg4audio_sample_rates.h"
|
@ -481,7 +481,7 @@ static int latm_context2config(AVFormatContext *s, const AVCodecParameters *par,
|
|||||||
*out = NULL;
|
*out = NULL;
|
||||||
|
|
||||||
for (rate_index = 0; rate_index < 16; rate_index++)
|
for (rate_index = 0; rate_index < 16; rate_index++)
|
||||||
if (avpriv_mpeg4audio_sample_rates[rate_index] == par->sample_rate)
|
if (ff_mpeg4audio_sample_rates[rate_index] == par->sample_rate)
|
||||||
break;
|
break;
|
||||||
if (rate_index == 16) {
|
if (rate_index == 16) {
|
||||||
av_log(s, AV_LOG_ERROR, "Unsupported sample rate\n");
|
av_log(s, AV_LOG_ERROR, "Unsupported sample rate\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user