mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
adx: rename ff_adx_decode_header() to avpriv_adx_decode_header()
It is used by the ADX decoder, and therefore needs to be exported in order to work with shared libs.
This commit is contained in:
parent
a17c3c7d15
commit
9d2dd356c2
@ -34,8 +34,8 @@ void ff_adx_calculate_coeffs(int cutoff, int sample_rate, int bits, int *coeff)
|
||||
coeff[1] = lrintf(-(c * c) * (1 << bits));
|
||||
}
|
||||
|
||||
int ff_adx_decode_header(AVCodecContext *avctx, const uint8_t *buf, int bufsize,
|
||||
int *header_size, int *coeff)
|
||||
int avpriv_adx_decode_header(AVCodecContext *avctx, const uint8_t *buf,
|
||||
int bufsize, int *header_size, int *coeff)
|
||||
{
|
||||
int offset, cutoff;
|
||||
|
||||
|
@ -74,7 +74,7 @@ void ff_adx_calculate_coeffs(int cutoff, int sample_rate, int bits, int *coeff);
|
||||
* @param[out] coeff 2 LPC coefficients, can be NULL
|
||||
* @return data offset or negative error code if header is invalid
|
||||
*/
|
||||
int ff_adx_decode_header(AVCodecContext *avctx, const uint8_t *buf, int bufsize,
|
||||
int *header_size, int *coeff);
|
||||
int avpriv_adx_decode_header(AVCodecContext *avctx, const uint8_t *buf,
|
||||
int bufsize, int *header_size, int *coeff);
|
||||
|
||||
#endif /* AVCODEC_ADX_H */
|
||||
|
@ -53,8 +53,8 @@ static int adx_parse(AVCodecParserContext *s1,
|
||||
ff_combine_frame(pc, END_NOT_FOUND, &buf, &buf_size);
|
||||
|
||||
if (!s->header_size && pc->index >= MIN_HEADER_SIZE) {
|
||||
if (ret = ff_adx_decode_header(avctx, pc->buffer, pc->index,
|
||||
&s->header_size, NULL))
|
||||
if (ret = avpriv_adx_decode_header(avctx, pc->buffer, pc->index,
|
||||
&s->header_size, NULL))
|
||||
return AVERROR_INVALIDDATA;
|
||||
s->block_size = BLOCK_SIZE * avctx->channels;
|
||||
}
|
||||
|
@ -41,8 +41,9 @@ static av_cold int adx_decode_init(AVCodecContext *avctx)
|
||||
if (avctx->extradata_size < 24)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if ((ret = ff_adx_decode_header(avctx, avctx->extradata, avctx->extradata_size,
|
||||
&header_size, c->coeff)) < 0) {
|
||||
if ((ret = avpriv_adx_decode_header(avctx, avctx->extradata,
|
||||
avctx->extradata_size, &header_size,
|
||||
c->coeff)) < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "error parsing ADX header\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
@ -86,8 +86,9 @@ static int adx_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
||||
}
|
||||
avctx->extradata_size = c->header_size;
|
||||
|
||||
ret = ff_adx_decode_header(avctx, avctx->extradata, avctx->extradata_size,
|
||||
&c->header_size, NULL);
|
||||
ret = avpriv_adx_decode_header(avctx, avctx->extradata,
|
||||
avctx->extradata_size, &c->header_size,
|
||||
NULL);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user