summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2015-03-29 16:22:30 +0000
committerjstebbins <[email protected]>2015-03-29 16:22:30 +0000
commit8e9bff8f32423c3ac69986bb3e4d03300d41dd4e (patch)
treea31260ce3ac5fc295f93f48ca2f7136563aa4455 /test
parent168ce686fd837de7fbf20266df31af2ac00c8db1 (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 'test')
-rw-r--r--test/test.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/test.c b/test/test.c
index bc6670193..b750f2acd 100644
--- a/test/test.c
+++ b/test/test.c
@@ -309,7 +309,12 @@ int main( int argc, char ** argv )
hb_system_sleep_prevent(h);
- hb_gui_use_hwd_flag = use_hwd;
+
+ // FIXME: When hardware decode is enabled, the scan must be performed
+ // with hardware decode enabled because the decoder context used during
+ // encoding phase comes from the context used during scan. This is
+ // broken by design and I would very much like to fix this someday.
+ hb_hwd_set_enable(h, use_hwd);
hb_scan( h, input, titleindex, preview_count, store_previews, min_title_duration * 90000LL );
/* Wait... */
@@ -1673,9 +1678,6 @@ static int HandleEvents( hb_handle_t * h )
hb_filter_object_t * filter;
- job->use_detelecine = detelecine;
- job->use_decomb = decomb;
-
/* Add selected filters */
if( detelecine )
{