diff options
author | Bradley Sepos <[email protected]> | 2015-08-29 18:55:32 -0400 |
---|---|---|
committer | Bradley Sepos <[email protected]> | 2015-09-10 15:33:06 -0400 |
commit | 400bb38bf8ebc7dbe1c8eb5f525983ebdfd5d3b0 (patch) | |
tree | 59c3e86962ff23c5d42efaca242257cf9b2ef487 /libhb/decavcodec.c | |
parent | cbb6fbdbdf2fec70a4d06bf8742c95dfb060f2ed (diff) |
libhb: Clock/frame rate handling improvements.
Allows for arbitrary frame rates between 1 and 1000 fps.
Adds min/max frame rates to CLI help.
Removes hardcoded instances of the internal clock rate in favor of hb_video_framerate_get_limits().
Unfortunately, much of the codebase generally refers to clock rate as frame rate, so a little extra care is still necessary going forward.
Diffstat (limited to 'libhb/decavcodec.c')
-rw-r--r-- | libhb/decavcodec.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index f81205ada..ae9806f95 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -2019,6 +2019,9 @@ static int decavcodecvInfo( hb_work_object_t *w, hb_work_info_t *info ) { hb_work_private_t *pv = w->private_data; + int clock_min, clock_max, clock; + hb_video_framerate_get_limits(&clock_min, &clock_max, &clock); + memset( info, 0, sizeof(*info) ); if (pv->context == NULL) @@ -2035,8 +2038,8 @@ static int decavcodecvInfo( hb_work_object_t *w, hb_work_info_t *info ) info->geometry.par.den = pv->context->sample_aspect_ratio.den; compute_frame_duration( pv ); - info->rate.num = 27000000; - info->rate.den = pv->duration * 300.; + info->rate.num = clock; + info->rate.den = pv->duration * (clock / 90000.); info->profile = pv->context->profile; info->level = pv->context->level; |