summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/Makefile5
-rw-r--r--libavformat/flvenc.c4
-rw-r--r--libavformat/matroskadec.c4
-rw-r--r--libavformat/mpeg4audio_sample_rates.c23
-rw-r--r--libavformat/sdp.c2
5 files changed, 32 insertions, 6 deletions
diff --git a/libavformat/Makefile b/libavformat/Makefile
index f5d6b8fecf..6482f247b6 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -681,11 +681,14 @@ OBJS-$(CONFIG_LIBZMQ_PROTOCOL) += libzmq.o
# Objects duplicated from other libraries for shared builds
SHLIBOBJS += log2_tab.o
+SHLIBOBJS-$(CONFIG_FLV_MUXER) += mpeg4audio_sample_rates.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_MXF_MUXER) += golomb_tab.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
# libavdevice dependencies
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index 31d1d93c23..66c530a2ff 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -24,6 +24,7 @@
#include "libavutil/intfloat.h"
#include "libavutil/avassert.h"
#include "libavutil/mathematics.h"
+#include "libavcodec/mpeg4audio.h"
#include "avio_internal.h"
#include "avio.h"
#include "avc.h"
@@ -33,7 +34,6 @@
#include "metadata.h"
#include "libavutil/opt.h"
#include "libavcodec/put_bits.h"
-#include "libavcodec/aacenctab.h"
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;
samplerate_index++)
if (flv->audio_par->sample_rate
- == mpeg4audio_sample_rates[samplerate_index])
+ == ff_mpeg4audio_sample_rates[samplerate_index])
break;
init_put_bits(&pbc, data, sizeof(data));
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 6ce553205d..e271916bf1 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2029,8 +2029,8 @@ static int matroska_aac_sri(int samplerate)
{
int sri;
- for (sri = 0; sri < FF_ARRAY_ELEMS(avpriv_mpeg4audio_sample_rates); sri++)
- if (avpriv_mpeg4audio_sample_rates[sri] == samplerate)
+ for (sri = 0; sri < FF_ARRAY_ELEMS(ff_mpeg4audio_sample_rates); sri++)
+ if (ff_mpeg4audio_sample_rates[sri] == samplerate)
break;
return sri;
}
diff --git a/libavformat/mpeg4audio_sample_rates.c b/libavformat/mpeg4audio_sample_rates.c
new file mode 100644
index 0000000000..212385f348
--- /dev/null
+++ b/libavformat/mpeg4audio_sample_rates.c
@@ -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"
diff --git a/libavformat/sdp.c b/libavformat/sdp.c
index 111a25b126..2230d74742 100644
--- a/libavformat/sdp.c
+++ b/libavformat/sdp.c
@@ -481,7 +481,7 @@ static int latm_context2config(AVFormatContext *s, const AVCodecParameters *par,
*out = NULL;
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;
if (rate_index == 16) {
av_log(s, AV_LOG_ERROR, "Unsupported sample rate\n");