[FFmpeg-cvslog] avcodec/avcodec: Remove always-false check
Andreas Rheinhardt
git at videolan.org
Sat Apr 12 11:11:31 EEST 2025
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at 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.rheinhardt at 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;
More information about the ffmpeg-cvslog
mailing list