From 005bf45c97513a71a33ff83b72ca9fe8c649c1aa Mon Sep 17 00:00:00 2001 From: sr55 Date: Wed, 11 Dec 2013 21:30:26 +0000 Subject: Fix a Segfault where the job struct is used after it's closed. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5927 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/work.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libhb/work.c') diff --git a/libhb/work.c b/libhb/work.c index b03ce13e2..02a57c069 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -1614,15 +1614,15 @@ cleanup: } } } - - hb_buffer_pool_free(); - hb_job_close( &job ); - + /* OpenCL: must be closed *after* freeing the buffer pool */ if (job->use_opencl) { hb_ocl_close(); } + + hb_buffer_pool_free(); + hb_job_close( &job ); } static inline void copy_chapter( hb_buffer_t * dst, hb_buffer_t * src ) -- cgit v1.2.3