From 93117add4ed41f9f87d1da16ca339b2efad6767d Mon Sep 17 00:00:00 2001 From: Rodeo Date: Thu, 30 May 2013 13:57:37 +0000 Subject: Don't expose rate, mixdown, dither and encoder arrays to the UIs. - instead, make these lists available through enumerators: --> hb_*_get_next( *last); - this should give us more flexibility to populate the lists at runtime, using the implementation(s) of our choice, whether they use arrays or not, without requiring UI modifications - use consistent naming for getters --> hb_get_best_foo() becomes hb_foo_get_best(), and so on - hb_*_get_from_name() and hb_*_ sanitize_name() sanitize the requested value to a supported one if it's unavailable - adds an additional, passthru-specific fallback mechanism - adds a list of video containers git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5526 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/encavcodec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libhb/encavcodec.c') diff --git a/libhb/encavcodec.c b/libhb/encavcodec.c index b232dae81..dcb19da34 100644 --- a/libhb/encavcodec.c +++ b/libhb/encavcodec.c @@ -117,12 +117,12 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job ) // to fps.den. if (fps.num == 27000000) { - int ii; - for (ii = 0; ii < hb_video_rates_count; ii++) + const hb_rate_t *video_framerate = NULL; + while ((video_framerate = hb_video_framerate_get_next(video_framerate)) != NULL) { - if (abs(fps.den - hb_video_rates[ii].rate) < 10) + if (abs(fps.den - video_framerate->rate) < 10) { - fps.den = hb_video_rates[ii].rate; + fps.den = video_framerate->rate; break; } } -- cgit v1.2.3