encoder/vorbis: move vorbis_info_init() call to constructor

This commit is contained in:
Max Kellermann 2016-05-09 13:22:59 +02:00
parent efcda95dda
commit 58c11c3128
1 changed files with 3 additions and 3 deletions

View File

@ -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) */