aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2016-01-01 17:05:37 +0100
committerHendrik Leppkes <h.leppkes@gmail.com>2016-01-01 17:05:37 +0100
commit92fe2adc1b2ba618dac5adf38557e09b534b2086 (patch)
tree7abcf5eaf8c16e6bb91487d3c6db85a8009f661b
parenta78d9abee0dfef2dc86e711e27b474e7d07dca2e (diff)
parentde9e199a039473ebe4b1b87382e3064d0ea2cf02 (diff)
downloadffmpeg-92fe2adc1b2ba618dac5adf38557e09b534b2086.tar.gz
Merge commit 'de9e199a039473ebe4b1b87382e3064d0ea2cf02'
* commit 'de9e199a039473ebe4b1b87382e3064d0ea2cf02': lavc: make avpriv_mpa_decode_header private on next bump Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
-rw-r--r--libavcodec/mpegaudio_parser.c2
-rw-r--r--libavcodec/mpegaudiodecheader.c11
-rw-r--r--libavcodec/mpegaudiodecheader.h6
3 files changed, 15 insertions, 4 deletions
diff --git a/libavcodec/mpegaudio_parser.c b/libavcodec/mpegaudio_parser.c
index 4c72131bd4..873f941237 100644
--- a/libavcodec/mpegaudio_parser.c
+++ b/libavcodec/mpegaudio_parser.c
@@ -69,7 +69,7 @@ static int mpegaudio_parse(AVCodecParserContext *s1,
state= (state<<8) + buf[i++];
- ret = avpriv_mpa_decode_header2(state, &sr, &channels, &frame_size, &bit_rate, &codec_id);
+ ret = ff_mpa_decode_header(state, &sr, &channels, &frame_size, &bit_rate, &codec_id);
if (ret < 4) {
if (i > 4)
s->header_count = -2;
diff --git a/libavcodec/mpegaudiodecheader.c b/libavcodec/mpegaudiodecheader.c
index 30033fb2a2..ae86b087f3 100644
--- a/libavcodec/mpegaudiodecheader.c
+++ b/libavcodec/mpegaudiodecheader.c
@@ -119,7 +119,7 @@ int avpriv_mpegaudio_decode_header(MPADecodeHeader *s, uint32_t header)
return 0;
}
-int avpriv_mpa_decode_header2(uint32_t head, int *sample_rate, int *channels, int *frame_size, int *bit_rate, enum AVCodecID *codec_id)
+int ff_mpa_decode_header(uint32_t head, int *sample_rate, int *channels, int *frame_size, int *bit_rate, enum AVCodecID *codec_id)
{
MPADecodeHeader s1, *s = &s1;
@@ -153,7 +153,14 @@ int avpriv_mpa_decode_header2(uint32_t head, int *sample_rate, int *channels, in
return s->frame_size;
}
+#if LIBAVCODEC_VERSION_MAJOR < 58
+int avpriv_mpa_decode_header2(uint32_t head, int *sample_rate, int *channels, int *frame_size, int *bit_rate, enum AVCodecID *codec_id)
+{
+ return ff_mpa_decode_header(head, sample_rate, channels, frame_size, bit_rate, codec_id);
+}
+
int avpriv_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate, int *channels, int *frame_size, int *bit_rate)
{
- return avpriv_mpa_decode_header2(head, sample_rate, channels, frame_size, bit_rate, &avctx->codec_id);
+ return ff_mpa_decode_header(head, sample_rate, channels, frame_size, bit_rate, &avctx->codec_id);
}
+#endif
diff --git a/libavcodec/mpegaudiodecheader.h b/libavcodec/mpegaudiodecheader.h
index 444b85f265..55d5a15632 100644
--- a/libavcodec/mpegaudiodecheader.h
+++ b/libavcodec/mpegaudiodecheader.h
@@ -54,9 +54,13 @@ int avpriv_mpegaudio_decode_header(MPADecodeHeader *s, uint32_t header);
/* useful helper to get mpeg audio stream infos. Return -1 if error in
header, otherwise the coded frame size in bytes */
-int avpriv_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate, int *channels, int *frame_size, int *bitrate);
+int ff_mpa_decode_header(uint32_t head, int *sample_rate,
+ int *channels, int *frame_size, int *bitrate, enum AVCodecID *codec_id);
+#if LIBAVCODEC_VERSION_MAJOR < 58
+int avpriv_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate, int *channels, int *frame_size, int *bitrate);
int avpriv_mpa_decode_header2(uint32_t head, int *sample_rate, int *channels, int *frame_size, int *bitrate, enum AVCodecID *codec_id);
+#endif
/* fast header check for resync */
static inline int ff_mpa_check_header(uint32_t header){