diff options
author | Rodeo <[email protected]> | 2013-05-30 13:57:37 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2013-05-30 13:57:37 +0000 |
commit | 93117add4ed41f9f87d1da16ca339b2efad6767d (patch) | |
tree | 755030aca2bd309d9a47f6748adc70a7ff4e839f /libhb/encavcodec.c | |
parent | bf0fe59e97a4fc22b0800191407cdeb758ed20fa (diff) |
Don't expose rate, mixdown, dither and encoder arrays to the UIs.
- instead, make these lists available through enumerators:
--> hb_*_get_next(<type> *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
Diffstat (limited to 'libhb/encavcodec.c')
-rw-r--r-- | libhb/encavcodec.c | 8 |
1 files changed, 4 insertions, 4 deletions
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; } } |