]> git.sesse.net Git - nageru/blobdiff - futatabi/video_stream.h
Fix some Futatabi shutdown problems.
[nageru] / futatabi / video_stream.h
index d0634e0d7b563c84d9c12b1471376009afb8003e..d4cb18eb7e91e758fc53d6e99adb90e7a2741e45 100644 (file)
@@ -13,6 +13,7 @@ extern "C" {
 #include "shared/ref_counted_gl_sync.h"
 #include "queue_spot_holder.h"
 
+#include <atomic>
 #include <chrono>
 #include <condition_variable>
 #include <deque>
@@ -66,6 +67,7 @@ private:
 
        void encode_thread_func();
        std::thread encode_thread;
+       std::atomic<bool> should_quit{false};
 
        static int write_packet2_thunk(void *opaque, uint8_t *buf, int buf_size, AVIODataMarkerType type, int64_t time);
        int write_packet2(uint8_t *buf, int buf_size, AVIODataMarkerType type, int64_t time);