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;
/* channels */
avctx->channels = buf[7];
- if (avctx->channels > 2)
+ if (avctx->channels <= 0 || avctx->channels > 2)
return AVERROR_INVALIDDATA;
/* sample rate */