diff options
author | jstebbins <[email protected]> | 2015-03-29 16:22:30 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2015-03-29 16:22:30 +0000 |
commit | 8e9bff8f32423c3ac69986bb3e4d03300d41dd4e (patch) | |
tree | a31260ce3ac5fc295f93f48ca2f7136563aa4455 /libhb/reader.c | |
parent | 168ce686fd837de7fbf20266df31af2ac00c8db1 (diff) |
libhb: Eliminate global variable hb_gui_use_hwd_flag
This global was shared between the CLI and libhb and used as a back door to
force scan and encode passes to use the same ffmpeg context for hardware
decoding. Aside from the fact that this context sharing should not be necessary
and needs fixing, this information belongs in the hb_handle_t that is shared
between the scan and the encode. So put it there and make sure the hb_handle_t
get propagated to where the flag is needed.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7028 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/reader.c')
-rw-r--r-- | libhb/reader.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libhb/reader.c b/libhb/reader.c index 530196e48..66b5cc617 100644 --- a/libhb/reader.c +++ b/libhb/reader.c @@ -35,6 +35,7 @@ typedef struct struct hb_work_private_s { + hb_handle_t * h; hb_job_t * job; hb_title_t * title; volatile int * die; @@ -74,7 +75,7 @@ static int hb_reader_open( hb_work_private_t * r ) { if ( r->title->type == HB_BD_TYPE ) { - if ( !( r->bd = hb_bd_init( r->title->path ) ) ) + if ( !( r->bd = hb_bd_init( r->h, r->title->path ) ) ) return 1; } else if ( r->title->type == HB_DVD_TYPE ) @@ -85,7 +86,7 @@ static int hb_reader_open( hb_work_private_t * r ) else if ( r->title->type == HB_STREAM_TYPE || r->title->type == HB_FF_STREAM_TYPE ) { - if ( !( r->stream = hb_stream_open( r->title->path, r->title, 0 ) ) ) + if (!(r->stream = hb_stream_open(r->h, r->title->path, r->title, 0))) return 1; } else @@ -103,6 +104,7 @@ static int hb_reader_init( hb_work_object_t * w, hb_job_t * job ) r = calloc( sizeof( hb_work_private_t ), 1 ); w->private_data = r; + r->h = job->h; r->job = job; r->title = job->title; r->die = job->die; |