summaryrefslogtreecommitdiffstats
path: root/libhb/work.c
diff options
context:
space:
mode:
authorjbrjake <[email protected]>2008-01-22 19:53:33 +0000
committerjbrjake <[email protected]>2008-01-22 19:53:33 +0000
commit4b36eaae98f6b2ac260f3ee741f22c7f07bcb7ad (patch)
tree566da627b82df9c439defb3ff6e2bdfb80c3a0ba /libhb/work.c
parent9f7c6f5bd3eb26e1bbaafa535aa7f2f600e4ab56 (diff)
Maintains separate filter settings for each job. This prevents the MacGui from using the same filter settings for every job in the queue. Patch from travistex.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1228 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/work.c')
-rw-r--r--libhb/work.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/libhb/work.c b/libhb/work.c
index e1d342f59..2f7bed926 100644
--- a/libhb/work.c
+++ b/libhb/work.c
@@ -178,7 +178,19 @@ static void do_job( hb_job_t * job, int cpu_count )
}
if (!detelecine_present)
- hb_list_add( job->filters, &hb_filter_detelecine );
+ {
+ /* Allocate the filter. */
+ hb_filter_object_t * filter = malloc( sizeof( hb_filter_object_t ) );
+
+ /* Copy in the contents of the detelecine struct. */
+ memcpy( filter, &hb_filter_detelecine, sizeof( hb_filter_object_t ) );
+
+ /* Set the name to a copy of the template name so render.c has something to free. */
+ filter->name = strdup(hb_filter_detelecine.name);
+
+ /* Add it to the list. */
+ hb_list_add( job->filters, filter );
+ }
hb_log("work: VFR mode -- Switching FPS to 29.97 and detelecining.");
}
@@ -728,6 +740,16 @@ static void do_job( hb_job_t * job, int cpu_count )
}
}
+ if( job->filters )
+ {
+ for( i = 0; i < hb_list_count( job->filters ); i++ )
+ {
+ hb_filter_object_t * filter = hb_list_item( job->filters, i );
+ hb_filter_close( &filter );
+ }
+ hb_list_close( &job->filters );
+ }
+
hb_buffer_pool_free();
hb_title_close( &job->title );