]> granicus.if.org Git - handbrake/commitdiff
libhb: initialize the buffer pool only once
authorjstebbins <jstebbins.hb@gmail.com>
Mon, 29 Dec 2014 18:06:51 +0000 (18:06 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Mon, 29 Dec 2014 18:06:51 +0000 (18:06 +0000)
We leak a little memory for the buffer pool lists if we initialize it
with every new hb_handle_t.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6673 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/hb.c

index 141d68f8d495cf12f639032adb5bc23fe396468e..e9d5e38dabb870ee77556138a6aa6e614dd932d7 100644 (file)
@@ -409,11 +409,6 @@ hb_handle_t * hb_init( int verbose, int update_check )
         }
     }
 
-    /*
-     * Initialise buffer pool
-     */
-    hb_buffer_pool_init();
-
     h->title_set.list_title = hb_list_init();
     h->jobs       = hb_list_init();
 
@@ -1582,6 +1577,11 @@ int hb_global_init()
     
     hb_common_global_init();
 
+    /*
+     * Initialise buffer pool
+     */
+    hb_buffer_pool_init();
+
     return result;
 }