if (avpkt->size < hdr_size * avctx->channels) {
av_log(avctx, AV_LOG_ERROR, "packet size is too small\n");
- return AVERROR(EINVAL);
+ return AVERROR_INVALIDDATA;
}
if (esc->data[0]) {
av_log(avctx, AV_LOG_ERROR, "unexpected data after first packet\n");
- return AVERROR(EINVAL);
+ return AVERROR_INVALIDDATA;
}
if (is_compr) {
}
if (!esc->data[0]) {
av_log(avctx, AV_LOG_ERROR, "unexpected empty packet\n");
- return AVERROR(EINVAL);
+ return AVERROR_INVALIDDATA;
}
/* decode next piece of data from the buffer */
if (avctx->channels < 1 || avctx->channels > 2) {
av_log(avctx, AV_LOG_ERROR, "8SVX does not support more than 2 channels\n");
- return AVERROR(EINVAL);
+ return AVERROR_INVALIDDATA;
}
switch(avctx->codec->id) {
case AV_CODEC_ID_PCM_S8_PLANAR:
break;
default:
- return -1;
+ return AVERROR_INVALIDDATA;
}
avctx->sample_fmt = AV_SAMPLE_FMT_U8P;
AVCodec ff_eightsvx_fib_decoder = {
.name = "8svx_fib",
+ .long_name = NULL_IF_CONFIG_SMALL("8SVX fibonacci"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_8SVX_FIB,
.priv_data_size = sizeof (EightSvxContext),
.init = eightsvx_decode_init,
.close = eightsvx_decode_close,
.decode = eightsvx_decode_frame,
- .capabilities = CODEC_CAP_DELAY | CODEC_CAP_DR1,
- .long_name = NULL_IF_CONFIG_SMALL("8SVX fibonacci"),
+ .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
AV_SAMPLE_FMT_NONE },
};
AVCodec ff_eightsvx_exp_decoder = {
.name = "8svx_exp",
+ .long_name = NULL_IF_CONFIG_SMALL("8SVX exponential"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_8SVX_EXP,
.priv_data_size = sizeof (EightSvxContext),
.init = eightsvx_decode_init,
.close = eightsvx_decode_close,
.decode = eightsvx_decode_frame,
- .capabilities = CODEC_CAP_DELAY | CODEC_CAP_DR1,
- .long_name = NULL_IF_CONFIG_SMALL("8SVX exponential"),
+ .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
AV_SAMPLE_FMT_NONE },
};
AVCodec ff_pcm_s8_planar_decoder = {
.name = "pcm_s8_planar",
+ .long_name = NULL_IF_CONFIG_SMALL("PCM signed 8-bit planar"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_PCM_S8_PLANAR,
.priv_data_size = sizeof(EightSvxContext),
.init = eightsvx_decode_init,
.close = eightsvx_decode_close,
.decode = eightsvx_decode_frame,
- .capabilities = CODEC_CAP_DELAY | CODEC_CAP_DR1,
- .long_name = NULL_IF_CONFIG_SMALL("PCM signed 8-bit planar"),
+ .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
AV_SAMPLE_FMT_NONE },
};