]> git.sesse.net Git - nageru/blobdiff - futatabi/player.cpp
Only enable the preview button if we can actually preview something.
[nageru] / futatabi / player.cpp
index 1d8962f25b6f657c54aa6c34074300ae9db9a791..12b1616978c3c002140ead42f2660c34a5f8019e 100644 (file)
@@ -143,7 +143,7 @@ void Player::play_playlist_once()
        if (!clip_ready) {
                if (video_stream != nullptr) {
                        ++metric_refresh_frame;
-                       string subtitle = "Futatabi " NAGERU_VERSION ";PAUSED;" + pause_status;
+                       string subtitle = "Futatabi " NAGERU_VERSION ";PAUSED;0.000;" + pause_status;
                        video_stream->schedule_refresh_frame(steady_clock::now(), pts, /*display_func=*/nullptr, QueueSpotHolder(),
                                subtitle);
                }
@@ -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)