MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / hb_close

Function hb_close

libhb/hb.c:2113–2141  ·  view source on GitHub ↗

* Closes access to libhb by freeing the hb_handle_t handle contained in hb_init. * @param _h Pointer to handle to hb_handle_t. */

Source from the content-addressed store, hash-verified

2111 * @param _h Pointer to handle to hb_handle_t.
2112 */
2113void hb_close( hb_handle_t ** _h )
2114{
2115 hb_handle_t * h = *_h;
2116 hb_title_t * title;
2117
2118 h->die = 1;
2119
2120 hb_thread_close( &h->main_thread );
2121
2122 while( ( title = hb_list_item( h->title_set.list_title, 0 ) ) )
2123 {
2124 hb_list_rem( h->title_set.list_title, title );
2125 hb_title_close( &title );
2126 }
2127 hb_list_close( &h->title_set.list_title );
2128 free((char*)h->title_set.path);
2129 h->title_set.path = NULL;
2130
2131 hb_list_close( &h->jobs );
2132 hb_lock_close( &h->state_lock );
2133 hb_lock_close( &h->pause_lock );
2134
2135 hb_system_sleep_opaque_close(&h->system_sleep_opaque);
2136
2137 free( h->interjob );
2138
2139 free( h );
2140 *_h = NULL;
2141}
2142
2143int hb_global_init_no_hardware()
2144{

Callers 2

mainFunction · 0.85
ghb_backend_closeFunction · 0.85

Calls 7

hb_thread_closeFunction · 0.85
hb_list_itemFunction · 0.85
hb_list_remFunction · 0.85
hb_title_closeFunction · 0.85
hb_list_closeFunction · 0.85
hb_lock_closeFunction · 0.85

Tested by 1

mainFunction · 0.68