]> git.sesse.net Git - nageru/blobdiff - futatabi/player.cpp
When sending original frames, do the reading in the queueing thread.
[nageru] / futatabi / player.cpp
index cebc317801c4588f81170dcf02b82b0c8cbe167f..6a8612f86e43be0f0f2e1740edd31a0c53ec61d9 100644 (file)
@@ -194,7 +194,6 @@ void Player::play_playlist_once()
                        {
                                lock_guard<mutex> lock(queue_state_mu);
                                if (splice_ready) {
-                                       fprintf(stderr, "splicing\n");
                                        if (next_clip == nullptr) {
                                                do_splice(to_splice_clip_list, clip_idx, -1, &clip_list);
                                        } else {
@@ -506,11 +505,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)