diff --git a/libavcodec/mpegaudio.h b/libavcodec/mpegaudio.h index d6a94ad9d0..f8a689ab98 100644 --- a/libavcodec/mpegaudio.h +++ b/libavcodec/mpegaudio.h @@ -116,7 +116,7 @@ typedef struct MPADecodeContext { } MPADecodeContext; int l2_select_table(int bitrate, int nb_channels, int freq, int lsf); -int mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate); +int ff_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate); void ff_mpa_synth_init(MPA_INT *window); void ff_mpa_synth_filter(MPA_INT *synth_buf_ptr, int *synth_buf_offset, MPA_INT *window, int *dither_state, diff --git a/libavcodec/mpegaudio_parser.c b/libavcodec/mpegaudio_parser.c index 714857623b..1c0364d81f 100644 --- a/libavcodec/mpegaudio_parser.c +++ b/libavcodec/mpegaudio_parser.c @@ -44,7 +44,7 @@ typedef struct MpegAudioParseContext { /* useful helper to get mpeg audio stream infos. Return -1 if error in header, otherwise the coded frame size in bytes */ -int mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate) +int ff_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate) { MPADecodeContext s1, *s = &s1; s1.avctx = avctx; @@ -52,7 +52,7 @@ int mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate) if (ff_mpa_check_header(head) != 0) return -1; - if (decode_header(s, head) != 0) { + if (ff_mpegaudio_decode_header(s, head) != 0) { return -1; } @@ -127,7 +127,7 @@ static int mpegaudio_parse(AVCodecParserContext *s1, header = (s->inbuf[0] << 24) | (s->inbuf[1] << 16) | (s->inbuf[2] << 8) | s->inbuf[3]; - ret = mpa_decode_header(avctx, header, &sr); + ret = ff_mpa_decode_header(avctx, header, &sr); if (ret < 0) { s->header_count= -2; /* no sync found : move by one byte (inefficient, but simple!) */ @@ -146,7 +146,7 @@ static int mpegaudio_parse(AVCodecParserContext *s1, #if 0 /* free format: prepare to compute frame size */ - if (decode_header(s, header) == 1) { + if (ff_mpegaudio_decode_header(s, header) == 1) { s->frame_size = -1; } #endif @@ -199,7 +199,7 @@ static int mpegaudio_parse(AVCodecParserContext *s1, s->free_format_frame_size -= padding; dprintf(avctx, "free frame size=%d padding=%d\n", s->free_format_frame_size, padding); - decode_header(s, header1); + ff_mpegaudio_decode_header(s, header1); goto next_data; } p++; diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index 141db767c4..b6fc291cac 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -2410,7 +2410,7 @@ retry: goto retry; } - if (decode_header(s, header) == 1) { + if (ff_mpegaudio_decode_header(s, header) == 1) { /* free format: prepare to compute frame size */ s->frame_size = -1; return -1; @@ -2487,7 +2487,7 @@ static int decode_frame_adu(AVCodecContext * avctx, return buf_size; } - decode_header(s, header); + ff_mpegaudio_decode_header(s, header); /* update codec info */ avctx->sample_rate = s->sample_rate; avctx->channels = s->nb_channels; @@ -2632,7 +2632,7 @@ static int decode_frame_mp3on4(AVCodecContext * avctx, return buf_size; } - decode_header(m, header); + ff_mpegaudio_decode_header(m, header); mp_decode_frame(m, decoded_buf, start, fsize); n = MPA_FRAME_SIZE * m->nb_channels; diff --git a/libavcodec/mpegaudiodecheader.c b/libavcodec/mpegaudiodecheader.c index 0b75e82e65..efea499619 100644 --- a/libavcodec/mpegaudiodecheader.c +++ b/libavcodec/mpegaudiodecheader.c @@ -30,7 +30,7 @@ #include "mpegaudiodata.h" -int decode_header(MPADecodeContext *s, uint32_t header) +int ff_mpegaudio_decode_header(MPADecodeContext *s, uint32_t header) { int sample_rate, frame_size, mpeg25, padding; int sample_rate_index, bitrate_index; diff --git a/libavcodec/mpegaudiodecheader.h b/libavcodec/mpegaudiodecheader.h index 7e9c6c5857..e773f2e9c0 100644 --- a/libavcodec/mpegaudiodecheader.h +++ b/libavcodec/mpegaudiodecheader.h @@ -34,6 +34,6 @@ /* header decoding. MUST check the header before because no consistency check is done there. Return 1 if free format found and that the frame size must be computed externally */ -int decode_header(MPADecodeContext *s, uint32_t header); +int ff_mpegaudio_decode_header(MPADecodeContext *s, uint32_t header); #endif /* MPEGAUDIODECHEADER_H */ diff --git a/libavformat/mp3.c b/libavformat/mp3.c index 424d58896a..6f1ab22441 100644 --- a/libavformat/mp3.c +++ b/libavformat/mp3.c @@ -264,7 +264,7 @@ static int mp3_read_probe(AVProbeData *p) for(frames = 0; buf2 < end; frames++) { header = (buf2[0] << 24) | (buf2[1] << 16) | (buf2[2] << 8) | buf2[3]; - fsize = mpa_decode_header(&avctx, header, &sample_rate); + fsize = ff_mpa_decode_header(&avctx, header, &sample_rate); if(fsize < 0) break; buf2 += fsize;