All pastes #636468 Raw Edit

Unnamed

public text v1 · immutable
#636468 ·published 2007-07-27 22:41 UTC
rendered paste body
Index: libhb/hb.c
===================================================================
--- libhb/hb.c  (revision 757)
+++ libhb/hb.c  (working copy)
@@ -718,6 +718,19 @@
     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 @@
     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 );
     }
Index: macosx/Controller.mm
===================================================================
--- macosx/Controller.mm        (revision 757)
+++ macosx/Controller.mm        (working copy)
@@ -1358,7 +1358,11 @@
                      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 */