From bb91724b941e6366711515a544b09385fbb6fc3d Mon Sep 17 00:00:00 2001 From: jacqueline Date: Mon, 16 Oct 2023 16:15:48 +1100 Subject: Codec memory tweaks - Ensure mad and ogg structs are allocated internally - Free old codec before making a new one --- src/codecs/include/mad.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/codecs/include/mad.hpp') diff --git a/src/codecs/include/mad.hpp b/src/codecs/include/mad.hpp index ef4e91f8..994e989c 100644 --- a/src/codecs/include/mad.hpp +++ b/src/codecs/include/mad.hpp @@ -38,16 +38,16 @@ class MadMp3Decoder : public ICodec { MadMp3Decoder& operator=(const MadMp3Decoder&) = delete; private: - auto SkipID3Tags(IStream &stream) -> void; + auto SkipID3Tags(IStream& stream) -> void; auto GetVbrLength(const mad_header& header) -> std::optional; auto GetBytesUsed() -> std::size_t; std::shared_ptr input_; SourceBuffer buffer_; - mad_stream stream_; - mad_frame frame_; - mad_synth synth_; + mad_stream* stream_; + mad_frame* frame_; + mad_synth* synth_; int current_sample_; bool is_eof_; -- cgit v1.2.3