diff options
-rw-r--r-- | src/odr-audioenc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/odr-audioenc.cpp b/src/odr-audioenc.cpp index bfc7738..0c7c9c3 100644 --- a/src/odr-audioenc.cpp +++ b/src/odr-audioenc.cpp @@ -472,7 +472,7 @@ public: SampleQueue<uint8_t> queue; - HANDLE_AACENCODER encoder; + HANDLE_AACENCODER encoder = nullptr; unique_ptr<AACDecoder> decoder; unique_ptr<StatsPublisher> stats_publisher; @@ -1249,7 +1249,7 @@ AudioEnc::~AudioEnc() free_rs_char(rs_handler); } - if (selected_encoder == encoder_selection_t::fdk_dabplus) { + if (encoder != nullptr and selected_encoder == encoder_selection_t::fdk_dabplus) { aacEncClose(&encoder); } } |