summaryrefslogtreecommitdiffstats
path: root/gtk/src/hb-backend.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/src/hb-backend.c')
-rw-r--r--gtk/src/hb-backend.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index 5feababa5..1df18e703 100644
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -1011,20 +1011,7 @@ lookup_param_option(const hb_filter_param_t *param, const GhbValue *gval)
gint
ghb_find_closest_audio_samplerate(gint irate)
{
- gint result;
- const hb_rate_t *rate;
-
- result = 0;
- for (rate = hb_audio_samplerate_get_next(NULL); rate != NULL;
- rate = hb_audio_samplerate_get_next(rate))
- {
- if (irate <= rate->rate)
- {
- result = rate->rate;
- break;
- }
- }
- return result;
+ return hb_audio_samplerate_find_closest(irate, HB_ACODEC_INVALID);
}
const iso639_lang_t* ghb_iso639_lookup_by_int(int idx)