static av_cold int flac_encode_close(AVCodecContext *avctx)
{
- if (avctx->priv_data) {
- FlacEncodeContext *s = avctx->priv_data;
- av_freep(&s->md5ctx);
- av_freep(&s->md5_buffer);
- ff_lpc_end(&s->lpc_ctx);
- }
- av_freep(&avctx->extradata);
- avctx->extradata_size = 0;
+ FlacEncodeContext *s = avctx->priv_data;
+
+ av_freep(&s->md5ctx);
+ av_freep(&s->md5_buffer);
+ ff_lpc_end(&s->lpc_ctx);
return 0;
}
.version = LIBAVUTIL_VERSION_INT,
};
-AVCodec ff_flac_encoder = {
+const AVCodec ff_flac_encoder = {
.name = "flac",
.long_name = NULL_IF_CONFIG_SMALL("FLAC (Free Lossless Audio Codec)"),
.type = AVMEDIA_TYPE_AUDIO,