summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorjbrjake <[email protected]>2008-09-26 17:59:04 +0000
committerjbrjake <[email protected]>2008-09-26 17:59:04 +0000
commitbc87236fba8932b761883822d92b708525454573 (patch)
tree645cde25fd69a3fdc54c4704e816242ae242aa50 /libhb
parentd1c5ec631e6afdd94af567aa5bd7f8b58e5c8676 (diff)
Now that the interfaces don't set job->vfr to 1 unless detelecine is enabled, libhb doesn't have to make sure the filter is on.
Also adds a sanity check to make sure frames aren't dropped in the AVI container, for those masochstic enough to use the format. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1774 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r--libhb/work.c36
1 files changed, 8 insertions, 28 deletions
diff --git a/libhb/work.c b/libhb/work.c
index bb4cfc7f7..c283f22a1 100644
--- a/libhb/work.c
+++ b/libhb/work.c
@@ -401,37 +401,17 @@ static void do_job( hb_job_t * job, int cpu_count )
hb_log( "New dimensions %i * %i", job->width, job->height );
}
+ if( ( job->mux & HB_MUX_AVI ) || job->cfr )
+ {
+ /* VFR detelecine is not compatible with AVI or constant frame rates. */
+ job->vfr = 0;
+ }
+
if ( job->vfr )
{
+ /* Ensure we're using "Same as source" FPS,
+ aka VFR, if we're doing VFR detelecine. */
job->vrate_base = title->rate_base;
-
- int detelecine_present = 0;
- if ( job->filters )
- {
- for( i = 0; i < hb_list_count( job->filters ); i++ )
- {
- hb_filter_object_t * filter = hb_list_item( job->filters, i );
- if (filter->id == FILTER_DETELECINE)
- detelecine_present = 1;
- }
- }
-
- if (!detelecine_present)
- {
- /* 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 -- adding detelecine filter");
- }
}
job->fifo_mpeg2 = hb_fifo_init( 256 );