diff options
Diffstat (limited to 'gtk/src/hb-backend.c')
-rw-r--r-- | gtk/src/hb-backend.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index 63ce0c063..71b6850e7 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -1121,6 +1121,24 @@ ghb_find_closest_audio_bitrate(gint codec, gint rate) return result; } +gint +ghb_find_closest_audio_rate(gint rate) +{ + gint ii; + gint result; + + result = 0; + for (ii = 0; ii < hb_audio_rates_count; ii++) + { + if (rate <= hb_audio_rates[ii].rate) + { + result = hb_audio_rates[ii].rate; + break; + } + } + return result; +} + static gint lookup_audio_bitrate_int(const GValue *rate) { |