summaryrefslogtreecommitdiff
path: root/src/encoder
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2016-05-09 13:22:59 +0200
committerMax Kellermann <max@duempel.org>2016-05-09 13:22:59 +0200
commit58c11c3128dbe8970b5186aa0b394e939d68c18d (patch)
treecaa98a66ad23e875cff7f97610978b64a67c2080 /src/encoder
parentefcda95ddaa30fbaeae56e73f61dcfb374bf4ec3 (diff)
encoder/vorbis: move vorbis_info_init() call to constructor
Diffstat (limited to 'src/encoder')
-rw-r--r--src/encoder/plugins/VorbisEncoderPlugin.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/encoder/plugins/VorbisEncoderPlugin.cxx b/src/encoder/plugins/VorbisEncoderPlugin.cxx
index 56b9158f4..cad00bd9f 100644
--- a/src/encoder/plugins/VorbisEncoderPlugin.cxx
+++ b/src/encoder/plugins/VorbisEncoderPlugin.cxx
@@ -39,7 +39,9 @@ class VorbisEncoder final : public OggEncoder {
public:
VorbisEncoder()
- :OggEncoder(true) {}
+ :OggEncoder(true) {
+ vorbis_info_init(&vi);
+ }
virtual ~VorbisEncoder() {
vorbis_block_clear(&vb);
@@ -152,8 +154,6 @@ VorbisEncoder::Open(float quality, int bitrate, AudioFormat &_audio_format,
_audio_format.format = SampleFormat::FLOAT;
audio_format = _audio_format;
- vorbis_info_init(&vi);
-
if (quality >= -1.0) {
/* a quality was configured (VBR) */