aboutsummaryrefslogtreecommitdiffstats
path: root/src/encoder/TwolameEncoderPlugin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/encoder/TwolameEncoderPlugin.cxx')
-rw-r--r--src/encoder/TwolameEncoderPlugin.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/encoder/TwolameEncoderPlugin.cxx b/src/encoder/TwolameEncoderPlugin.cxx
index 6862173f7..543e71d64 100644
--- a/src/encoder/TwolameEncoderPlugin.cxx
+++ b/src/encoder/TwolameEncoderPlugin.cxx
@@ -22,14 +22,13 @@
#include "EncoderAPI.hxx"
#include "AudioFormat.hxx"
#include "ConfigError.hxx"
+#include "util/NumberParser.hxx"
#include "util/Error.hxx"
#include "util/Domain.hxx"
#include "Log.hxx"
#include <twolame.h>
-#include <glib.h>
-
#include <assert.h>
#include <string.h>
@@ -69,7 +68,7 @@ TwolameEncoder::Configure(const config_param &param, Error &error)
if (value != nullptr) {
/* a quality was configured (VBR) */
- quality = g_ascii_strtod(value, &endptr);
+ quality = ParseDouble(value, &endptr);
if (*endptr != '\0' || quality < -1.0 || quality > 10.0) {
error.Format(config_domain,
@@ -95,7 +94,7 @@ TwolameEncoder::Configure(const config_param &param, Error &error)
}
quality = -2.0;
- bitrate = g_ascii_strtoll(value, &endptr, 10);
+ bitrate = ParseInt(value, &endptr);
if (*endptr != '\0' || bitrate <= 0) {
error.Set(config_domain,