diff options
author | sr55 <[email protected]> | 2010-02-06 21:09:29 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2010-02-06 21:09:29 +0000 |
commit | ac797923ab0fe26b3ba79d2f4b96f957ddf44bf4 (patch) | |
tree | ba316fc6160c57b104cb5a22cac47fa2984e366f /libhb/hb.c | |
parent | 138f6356d1436a103337fa6cd4b299c8f252f737 (diff) |
libhb dll fix by RandomEngy
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3101 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/hb.c')
-rw-r--r-- | libhb/hb.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libhb/hb.c b/libhb/hb.c index ad51962c5..11afcc137 100644 --- a/libhb/hb.c +++ b/libhb/hb.c @@ -49,9 +49,16 @@ struct hb_handle_s hb_lock_t *hb_avcodec_lock; hb_work_object_t * hb_objects = NULL; +hb_process_initialized = 0; static void thread_func( void * ); + +int hello_world(){ + return 55555; +} + + void hb_avcodec_init() { hb_avcodec_lock = hb_lock_init(); @@ -94,6 +101,16 @@ void hb_register( hb_work_object_t * w ) */ hb_handle_t * hb_init( int verbose, int update_check ) { + if (!hb_process_initialized) + { +#ifdef USE_PTHREAD +#if defined( _WIN32 ) || defined( __MINGW32__ ) + pthread_win32_process_attach_np(); +#endif +#endif + hb_process_initialized =1; + } + hb_handle_t * h = calloc( sizeof( hb_handle_t ), 1 ); uint64_t date; |