summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2016-05-09 13:22:27 +0200
committerMax Kellermann <max@duempel.org>2016-05-09 13:22:27 +0200
commit80d2028bac81a7135b54eff1d2566b403814e6b5 (patch)
treec8b50946ad1864cfbc8f49f8fe877e73d3a22437
parent215213fc2cafd0ebcd9af8c776cdc1c416014c13 (diff)
encoder/vorbis: merge Clear() into the destructor
-rw-r--r--src/encoder/plugins/VorbisEncoderPlugin.cxx13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/encoder/plugins/VorbisEncoderPlugin.cxx b/src/encoder/plugins/VorbisEncoderPlugin.cxx
index ab097131f..2beb98eb7 100644
--- a/src/encoder/plugins/VorbisEncoderPlugin.cxx
+++ b/src/encoder/plugins/VorbisEncoderPlugin.cxx
@@ -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) {