[PATCH 14/18] libmpcodecs/vf_screenshot: use avcodec_free_context()

Nicolas George <[email protected]> Tue, 28 Jul 2026 20:15:10 +0200
Newsgroups gmane.comp.video.mplayer.devel
Message-ID <[email protected]>
---
 libmpcodecs/vf_screenshot.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libmpcodecs/vf_screenshot.c b/libmpcodecs/vf_screenshot.c
index 4aa5ee274..65745518d 100644
--- a/libmpcodecs/vf_screenshot.c
+++ b/libmpcodecs/vf_screenshot.c
@@ -279,8 +279,7 @@ static int query_format(struct vf_instance *vf, unsigned int fmt)
 
 static void uninit(vf_instance_t *vf)
 {
-    avcodec_close(vf->priv->avctx);
-    av_freep(&vf->priv->avctx);
+    avcodec_free_context(&vf->priv->avctx);
     if(vf->priv->ctx) sws_freeContext(vf->priv->ctx);
     av_freep(&vf->priv->pic->data[0]);
     av_frame_free(&vf->priv->pic);
-- 
2.53.0

_______________________________________________
MPlayer-dev-eng mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo/%(_internal_name)s