Commit 80d2028b authored by Max Kellermann's avatar Max Kellermann

encoder/vorbis: merge Clear() into the destructor

parent 215213fc
......@@ -42,7 +42,9 @@ public:
:OggEncoder(true) {}
virtual ~VorbisEncoder() {
Clear();
vorbis_block_clear(&vb);
vorbis_dsp_clear(&vd);
vorbis_info_clear(&vi);
}
bool Open(float quality, int bitrate, AudioFormat &audio_format,
......@@ -62,7 +64,6 @@ private:
void HeaderOut(vorbis_comment &vc);
void SendHeader();
void BlockOut();
void Clear();
};
class PreparedVorbisEncoder final : public PreparedEncoder {
......@@ -220,14 +221,6 @@ PreparedVorbisEncoder::Open(AudioFormat &audio_format, Error &error)
}
void
VorbisEncoder::Clear()
{
vorbis_block_clear(&vb);
vorbis_dsp_clear(&vd);
vorbis_info_clear(&vi);
}
void
VorbisEncoder::BlockOut()
{
while (vorbis_analysis_blockout(&vd, &vb) == 1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment