]> git.sesse.net Git - nageru/blobdiff - nageru/audio_encoder.h
Fix crash without SRT output.
[nageru] / nageru / audio_encoder.h
index ca2634fe62df2cd2f0bc311a4112b52e44415cd6..bd279784950752fae64cbcd7eccd26430e6419bf 100644 (file)
@@ -3,6 +3,7 @@
 #ifndef _AUDIO_ENCODER_H
 #define _AUDIO_ENCODER_H 1
 
+#include <assert.h>
 #include <stddef.h>
 #include <stdint.h>
 #include <string>
@@ -25,6 +26,7 @@ public:
        ~AudioEncoder();
 
        void add_mux(Mux *mux) {  // Does not take ownership.
+               assert(mux != nullptr);
                muxes.push_back(mux);
        }
        void encode_audio(const std::vector<float> &audio, int64_t audio_pts);