}
dsputil_init(&s->dsp, avctx);
- avctx->sample_fmt = SAMPLE_FMT_S16;
+ avctx->sample_fmt = AV_SAMPLE_FMT_S16;
avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO;
return 0;
}
return bytes_used;
}
+static void ape_flush(AVCodecContext *avctx)
+{
+ APEContext *s = avctx->priv_data;
+ s->samples= 0;
+}
+
AVCodec ape_decoder = {
"ape",
AVMEDIA_TYPE_AUDIO,
ape_decode_close,
ape_decode_frame,
.capabilities = CODEC_CAP_SUBFRAMES,
+ .flush = ape_flush,
.long_name = NULL_IF_CONFIG_SMALL("Monkey's Audio"),
};