summaryrefslogtreecommitdiffstats
path: root/libhb/scan.c
diff options
context:
space:
mode:
authorRodeo <[email protected]>2013-05-30 13:57:37 +0000
committerRodeo <[email protected]>2013-05-30 13:57:37 +0000
commit93117add4ed41f9f87d1da16ca339b2efad6767d (patch)
tree755030aca2bd309d9a47f6748adc70a7ff4e839f /libhb/scan.c
parentbf0fe59e97a4fc22b0800191407cdeb758ed20fa (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/scan.c')
-rw-r--r--libhb/scan.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libhb/scan.c b/libhb/scan.c
index c83326d4d..0d7dde7ff 100644
--- a/libhb/scan.c
+++ b/libhb/scan.c
@@ -820,11 +820,12 @@ skip_preview:
// if the frame rate is very close to one of our "common" framerates,
// assume it actually is said frame rate; e.g. some 24000/1001 sources
// may have a rate_base of 1126124 (instead of 1126125)
- for( i = 0; i < hb_video_rates_count; i++ )
+ const hb_rate_t *video_framerate = NULL;
+ while ((video_framerate = hb_video_framerate_get_next(video_framerate)) != NULL)
{
- if( is_close_to( vid_info.rate_base, hb_video_rates[i].rate, 100 ) )
+ if (is_close_to(vid_info.rate_base, video_framerate->rate, 100))
{
- vid_info.rate_base = hb_video_rates[i].rate;
+ vid_info.rate_base = video_framerate->rate;
break;
}
}