summaryrefslogtreecommitdiffstats
path: root/libhb/work.c
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2017-02-09 10:23:19 -0700
committerJohn Stebbins <[email protected]>2017-02-09 10:23:19 -0700
commit6674825664c4847c74ccc99ef35a0c85f2df9eb8 (patch)
treed0ce2d871bc0567a058e37d8284636c1a55b7eea /libhb/work.c
parent5869f45d7c83f17a8c079ae85d7f54a300449aae (diff)
libhb: fix Bob + CFR Same As Source + 2 Pass encode
The bob filter predicts the resulting output framerate as 2 * input framerate. So during 2 pass encoding, we must adjust the framerate with the knows 1st pass values *after* any predictions made by filters. Fixes https://github.com/HandBrake/HandBrake/issues/556
Diffstat (limited to 'libhb/work.c')
-rw-r--r--libhb/work.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libhb/work.c b/libhb/work.c
index 8aa920860..9010f1d3a 100644
--- a/libhb/work.c
+++ b/libhb/work.c
@@ -1363,10 +1363,6 @@ static void do_job(hb_job_t *job)
memset(interjob, 0, sizeof(*interjob));
interjob->sequence_id = job->sequence_id;
}
- else if (job->pass_id == HB_PASS_ENCODE_2ND)
- {
- correct_framerate(interjob, job);
- }
job->list_work = hb_list_init();
w = hb_get_work(job->h, WORK_READER);
@@ -1484,6 +1480,11 @@ static void do_job(hb_job_t *job)
job->cfr = 0;
}
+ if (job->pass_id == HB_PASS_ENCODE_2ND)
+ {
+ correct_framerate(interjob, job);
+ }
+
/*
* The frame rate may affect the bitstream's time base, lose superfluous
* factors for consistency (some encoders reduce fractions, some don't).