]> git.sesse.net Git - nageru/blobdiff - futatabi/player.cpp
Fix some memory leaks on export.
[nageru] / futatabi / player.cpp
index cebc317801c4588f81170dcf02b82b0c8cbe167f..12b1616978c3c002140ead42f2660c34a5f8019e 100644 (file)
@@ -506,11 +506,12 @@ Player::Player(JPEGFrameView *destination, Player::StreamOutput stream_output, A
 Player::~Player()
 {
        should_quit = true;
+       new_clip_changed.notify_all();
+       player_thread.join();
+
        if (video_stream != nullptr) {
                video_stream->stop();
        }
-       new_clip_changed.notify_all();
-       player_thread.join();
 }
 
 void Player::play(const vector<ClipWithID> &clips)