]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/flacenc: Remove always-true check
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Sun, 29 Nov 2020 21:32:34 +0000 (22:32 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Wed, 28 Apr 2021 15:42:37 +0000 (17:42 +0200)
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
libavcodec/flacenc.c

index 12896de262f3cdda5eca57f9ff4058174de0b74d..2a1198987d389cec36c614b6a4b540df61feac53 100644 (file)
@@ -1407,12 +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);
-    }
+    FlacEncodeContext *s = avctx->priv_data;
+
+    av_freep(&s->md5ctx);
+    av_freep(&s->md5_buffer);
+    ff_lpc_end(&s->lpc_ctx);
     return 0;
 }