|
|
@ -40,9 +40,9 @@ static av_cold int adx_decode_init(AVCodecContext *avctx) |
|
|
|
int ret, header_size; |
|
|
|
int ret, header_size; |
|
|
|
|
|
|
|
|
|
|
|
if (avctx->extradata_size >= 24) { |
|
|
|
if (avctx->extradata_size >= 24) { |
|
|
|
if ((ret = avpriv_adx_decode_header(avctx, avctx->extradata, |
|
|
|
if ((ret = ff_adx_decode_header(avctx, avctx->extradata, |
|
|
|
avctx->extradata_size, &header_size, |
|
|
|
avctx->extradata_size, &header_size, |
|
|
|
c->coeff)) < 0) { |
|
|
|
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; |
|
|
|
} |
|
|
|
} |
|
|
@ -110,8 +110,8 @@ static int adx_decode_frame(AVCodecContext *avctx, void *data, |
|
|
|
|
|
|
|
|
|
|
|
if (!c->header_parsed && buf_size >= 2 && AV_RB16(buf) == 0x8000) { |
|
|
|
if (!c->header_parsed && buf_size >= 2 && AV_RB16(buf) == 0x8000) { |
|
|
|
int header_size; |
|
|
|
int header_size; |
|
|
|
if ((ret = avpriv_adx_decode_header(avctx, buf, buf_size, &header_size, |
|
|
|
if ((ret = ff_adx_decode_header(avctx, buf, buf_size, &header_size, |
|
|
|
c->coeff)) < 0) { |
|
|
|
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; |
|
|
|
} |
|
|
|
} |
|
|
|