avcodec/avdct: use the proper function to free AVCodecContext
authorJames Almer <jamrial@gmail.com>
Mon, 26 Mar 2018 15:51:25 +0000 (12:51 -0300)
committerJames Almer <jamrial@gmail.com>
Mon, 26 Mar 2018 15:51:25 +0000 (12:51 -0300)
Fixes ticket #7074

Signed-off-by: James Almer <jamrial@gmail.com>
libavcodec/avdct.c

index 860f865..47e5f71 100644 (file)
@@ -123,8 +123,7 @@ int avcodec_dct_init(AVDCT *dsp)
     }
 #endif
 
-    avcodec_close(avctx);
-    av_free(avctx);
+    avcodec_free_context(&avctx);
 
     return 0;
 }