int32_t *sample24;
int i, ch, ret;
int blockstodecode;
- int bytes_used = 0;
/* this should never be negative, but bad things will happen if it is, so
check it just to make sure. */
return AVERROR_INVALIDDATA;
}
- bytes_used = avpkt->size;
}
if (!s->data) {
*got_frame_ptr = 1;
- return bytes_used;
+ return (s->samples == 0) ? avpkt->size : 0;
}
static void ape_flush(AVCodecContext *avctx)
AVCodec ff_ape_decoder = {
.name = "ape",
+ .long_name = NULL_IF_CONFIG_SMALL("Monkey's Audio"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_APE,
.priv_data_size = sizeof(APEContext),
.decode = ape_decode_frame,
.capabilities = CODEC_CAP_SUBFRAMES | CODEC_CAP_DELAY | CODEC_CAP_DR1,
.flush = ape_flush,
- .long_name = NULL_IF_CONFIG_SMALL("Monkey's Audio"),
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_S32P,