]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/flacenc.c
doc/filters: Documentation to add sess_config option for tensorflow backend
[ffmpeg] / libavcodec / flacenc.c
index 9460b1afc8840e535af9ba9aded165a13a31f24b..2a1198987d389cec36c614b6a4b540df61feac53 100644 (file)
@@ -1407,14 +1407,11 @@ static int flac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
 
 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;
 }
 
@@ -1457,7 +1454,7 @@ static const AVClass flac_encoder_class = {
     .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,