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));
|
coeff[1] = lrintf(-(c * c) * (1 << bits));
|
||||||
}
|
}
|
||||||
|
|
||||||
int ff_adx_decode_header(AVCodecContext *avctx, const uint8_t *buf, int bufsize,
|
int avpriv_adx_decode_header(AVCodecContext *avctx, const uint8_t *buf,
|
||||||
int *header_size, int *coeff)
|
int bufsize, int *header_size, int *coeff)
|
||||||
{
|
{
|
||||||
int offset, cutoff;
|
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
|
* @param[out] coeff 2 LPC coefficients, can be NULL
|
||||||
* @return data offset or negative error code if header is invalid
|
* @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 avpriv_adx_decode_header(AVCodecContext *avctx, const uint8_t *buf,
|
||||||
int *header_size, int *coeff);
|
int bufsize, int *header_size, int *coeff);
|
||||||
|
|
||||||
#endif /* AVCODEC_ADX_H */
|
#endif /* AVCODEC_ADX_H */
|
||||||
|
@ -53,7 +53,7 @@ static int adx_parse(AVCodecParserContext *s1,
|
|||||||
ff_combine_frame(pc, END_NOT_FOUND, &buf, &buf_size);
|
ff_combine_frame(pc, END_NOT_FOUND, &buf, &buf_size);
|
||||||
|
|
||||||
if (!s->header_size && pc->index >= MIN_HEADER_SIZE) {
|
if (!s->header_size && pc->index >= MIN_HEADER_SIZE) {
|
||||||
if (ret = ff_adx_decode_header(avctx, pc->buffer, pc->index,
|
if (ret = avpriv_adx_decode_header(avctx, pc->buffer, pc->index,
|
||||||
&s->header_size, NULL))
|
&s->header_size, NULL))
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
s->block_size = BLOCK_SIZE * avctx->channels;
|
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)
|
if (avctx->extradata_size < 24)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
if ((ret = ff_adx_decode_header(avctx, avctx->extradata, avctx->extradata_size,
|
if ((ret = avpriv_adx_decode_header(avctx, avctx->extradata,
|
||||||
&header_size, c->coeff)) < 0) {
|
avctx->extradata_size, &header_size,
|
||||||
|
c->coeff)) < 0) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "error parsing ADX header\n");
|
av_log(avctx, AV_LOG_ERROR, "error parsing ADX header\n");
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
@ -86,8 +86,9 @@ static int adx_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
|||||||
}
|
}
|
||||||
avctx->extradata_size = c->header_size;
|
avctx->extradata_size = c->header_size;
|
||||||
|
|
||||||
ret = ff_adx_decode_header(avctx, avctx->extradata, avctx->extradata_size,
|
ret = avpriv_adx_decode_header(avctx, avctx->extradata,
|
||||||
&c->header_size, NULL);
|
avctx->extradata_size, &c->header_size,
|
||||||
|
NULL);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user