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/bd.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/bd.c')
-rw-r--r-- | libhb/bd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libhb/bd.c b/libhb/bd.c index 20979e397..abe13fa5d 100644 --- a/libhb/bd.c +++ b/libhb/bd.c @@ -23,6 +23,7 @@ struct hb_bd_s hb_stream_t * stream; int chapter; int next_chap; + hb_handle_t * h; }; /*********************************************************************** @@ -36,12 +37,13 @@ static int title_info_compare_mpls(const void *, const void *); *********************************************************************** * **********************************************************************/ -hb_bd_t * hb_bd_init( char * path ) +hb_bd_t * hb_bd_init( hb_handle_t *h, char * path ) { hb_bd_t * d; int ii; d = calloc( sizeof( hb_bd_t ), 1 ); + d->h = h; /* Open device */ d->bd = bd_open( path, NULL ); @@ -635,7 +637,7 @@ int hb_bd_start( hb_bd_t * d, hb_title_t *title ) bd_select_title( d->bd, d->title_info[title->index - 1]->idx ); bd_get_event( d->bd, &event ); d->chapter = 1; - d->stream = hb_bd_stream_open( title ); + d->stream = hb_bd_stream_open( d->h, title ); if ( d->stream == NULL ) { return 0; |