[FFmpeg-cvslog] avcodec/flacenc: Remove always-true check

Andreas Rheinhardt git at videolan.org
Wed Apr 28 18:54:12 EEST 2021


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sun Nov 29 22:32:34 2020 +0100| [2606c48391377681541111263de41c79adeffa49] | committer: Andreas Rheinhardt

avcodec/flacenc: Remove always-true check

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2606c48391377681541111263de41c79adeffa49
---

 libavcodec/flacenc.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
index 12896de262..2a1198987d 100644
--- a/libavcodec/flacenc.c
+++ b/libavcodec/flacenc.c
@@ -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;
 }
 



More information about the ffmpeg-cvslog mailing list