[FFmpeg-cvslog] avcodec/avdct: use the proper function to free AVCodecContext

James Almer git at videolan.org
Mon Mar 26 18:52:26 EEST 2018


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Mon Mar 26 12:51:25 2018 -0300| [3c245707bd48291af544683bc875e531dd83d5d1] | committer: James Almer

avcodec/avdct: use the proper function to free AVCodecContext

Fixes ticket #7074

Signed-off-by: James Almer <jamrial at gmail.com>

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

 libavcodec/avdct.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/avdct.c b/libavcodec/avdct.c
index 860f86595d..47e5f7134e 100644
--- a/libavcodec/avdct.c
+++ b/libavcodec/avdct.c
@@ -123,8 +123,7 @@ int avcodec_dct_init(AVDCT *dsp)
     }
 #endif
 
-    avcodec_close(avctx);
-    av_free(avctx);
+    avcodec_free_context(&avctx);
 
     return 0;
 }



More information about the ffmpeg-cvslog mailing list