-AVCodec libspeex_decoder = {
- "libspeex",
- CODEC_TYPE_AUDIO,
- CODEC_ID_SPEEX,
- sizeof(LibSpeexContext),
- libspeex_decode_init,
- NULL,
- libspeex_decode_close,
- libspeex_decode_frame,
- .long_name = NULL_IF_CONFIG_SMALL("libspeex Speex"),
+static av_cold void libspeex_decode_flush(AVCodecContext *avctx)
+{
+ LibSpeexContext *s = avctx->priv_data;
+ speex_bits_reset(&s->bits);
+}
+
+AVCodec ff_libspeex_decoder = {
+ .name = "libspeex",
+ .type = AVMEDIA_TYPE_AUDIO,
+ .id = AV_CODEC_ID_SPEEX,
+ .priv_data_size = sizeof(LibSpeexContext),
+ .init = libspeex_decode_init,
+ .close = libspeex_decode_close,
+ .decode = libspeex_decode_frame,
+ .flush = libspeex_decode_flush,
+ .capabilities = CODEC_CAP_SUBFRAMES | CODEC_CAP_DELAY | CODEC_CAP_DR1,
+ .long_name = NULL_IF_CONFIG_SMALL("libspeex Speex"),