summaryrefslogtreecommitdiffstats
path: root/libhb/reader.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2014-12-16 16:50:50 +0000
committerjstebbins <[email protected]>2014-12-16 16:50:50 +0000
commitf56efd7b52c89da8cac55b4d4a187f2c87fdfee6 (patch)
tree24eacb856704fa8e4b8b8f0edc76568916f70255 /libhb/reader.c
parentd0a975e42dcab93e1d2eead350fb1ba3951d977c (diff)
json: add json APIs
There are several changes to job and title structs that break current windows interop code. The interop code should be changed such that it only uses json APIs. So if there is any missing features (or bugs) in these APIs, please let me know. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6602 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/reader.c')
-rw-r--r--libhb/reader.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libhb/reader.c b/libhb/reader.c
index 11729601c..72c27e34f 100644
--- a/libhb/reader.c
+++ b/libhb/reader.c
@@ -111,8 +111,8 @@ static int hb_reader_init( hb_work_object_t * w, hb_job_t * job )
r->st_slots = 4;
r->stream_timing = calloc( sizeof(stream_timing_t), r->st_slots );
r->stream_timing[0].id = r->title->video_id;
- r->stream_timing[0].average = 90000. * (double)job->vrate_base /
- (double)job->vrate;
+ r->stream_timing[0].average = 90000. * (double)job->vrate.den /
+ job->vrate.num;
r->stream_timing[0].filtered_average = r->stream_timing[0].average;
r->stream_timing[0].last = -r->stream_timing[0].average;
r->stream_timing[0].valid = 1;
@@ -139,7 +139,8 @@ static int hb_reader_init( hb_work_object_t * w, hb_job_t * job )
else if (job->frame_to_stop)
{
int frames = job->frame_to_start + job->frame_to_stop;
- r->duration = (int64_t)frames * job->title->rate_base * 90000 / job->title->rate;
+ r->duration = (int64_t)frames * job->title->vrate.den * 90000 /
+ job->title->vrate.num;
}
else
{