summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjbrjake <[email protected]>2007-07-27 22:46:37 +0000
committerjbrjake <[email protected]>2007-07-27 22:46:37 +0000
commit8cf975588cedef047e8f9cd84d2a4364351205da (patch)
tree3e165e5e34b678f02b9a46bdb701b747c9a8b0f1
parente1d204817a9eef7632bb8c805caf9ab52635c25b (diff)
Patch from huevos_rancheros to restore 2-pass functionality, which broke when the new filters got added.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@758 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--libhb/hb.c17
-rw-r--r--macosx/Controller.mm6
2 files changed, 22 insertions, 1 deletions
diff --git a/libhb/hb.c b/libhb/hb.c
index f3ec1bbcf..482b4d773 100644
--- a/libhb/hb.c
+++ b/libhb/hb.c
@@ -718,6 +718,19 @@ void hb_add( hb_handle_t * h, hb_job_t * job )
job_copy->h = h;
job_copy->pause = h->pause_lock;
+ /* Copy the job filter list */
+ if( job->filters )
+ {
+ int i;
+ int filter_count = hb_list_count( job->filters );
+ job_copy->filters = hb_list_init();
+ for( i = 0; i < filter_count; i++ )
+ {
+ hb_filter_object_t * filter = hb_list_item( job->filters, i );
+ hb_list_add( job_copy->filters, filter );
+ }
+ }
+
/* Add the job to the list */
hb_list_add( h->jobs, job_copy );
h->job_count = hb_count(h);
@@ -855,6 +868,10 @@ void hb_close( hb_handle_t ** _h )
while( ( title = hb_list_item( h->list_title, 0 ) ) )
{
hb_list_rem( h->list_title, title );
+ if( title->job && title->job->filters )
+ {
+ hb_list_close( &title->job->filters );
+ }
free( title->job );
hb_title_close( &title );
}
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index 189b6ec51..a2f751388 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -1358,7 +1358,11 @@ list = hb_get_titles( fHandle );
indexOfSelectedItem]].rate;
job->abitrate = [[fAudBitratePopUp selectedItem] tag];
- /* TODO: Filter settings */
+ /* TODO: Filter settings */
+ if( job->filters )
+ {
+ hb_list_close( &job->filters );
+ }
job->filters = hb_list_init();
#if 1
/* Run old deinterlacer if deinterlacing specified */