From 767fea6f4f5c9a9fa4ac1741af803bddf4595ef5 Mon Sep 17 00:00:00 2001 From: reimar Date: Thu, 8 Feb 2007 15:42:53 +0000 Subject: [PATCH] Avoid crash when uninit is called without ever calling config in x264 encoder git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22176 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/ve_x264.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libmpcodecs/ve_x264.c b/libmpcodecs/ve_x264.c index 517c9b1662..e40f3986d4 100644 --- a/libmpcodecs/ve_x264.c +++ b/libmpcodecs/ve_x264.c @@ -324,6 +324,7 @@ static int encode_frame(struct vf_instance_s *vf, x264_picture_t *pic_in) static void uninit(struct vf_instance_s *vf) { h264_module_t *mod=(h264_module_t*)vf->priv; + if (mod->x264) x264_encoder_close(mod->x264); }