ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | 
Wed Apr  9 14:47:35 2025 +0200| [30996b71950317feae506a8abf87af286f3cedd3] | 
committer: Andreas Rheinhardt

avcodec/avcodec: Remove always-false check

avcodec_free_context() only calls ff_codec_close() if there
is an AVCodecContext and avcodec_open2() unconditionally
dereferences the AVCodecContext*.

Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com>

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

 libavcodec/avcodec.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c
index c7f75b3e89..7bcb0295e5 100644
--- a/libavcodec/avcodec.c
+++ b/libavcodec/avcodec.c
@@ -429,9 +429,6 @@ av_cold void ff_codec_close(AVCodecContext *avctx)
 {
     int i;
 
-    if (!avctx)
-        return;
-
     if (avcodec_is_open(avctx)) {
         AVCodecInternal *avci = avctx->internal;
 

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to