X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=futatabi%2Fplayer.cpp;h=0d9e0926b3795285c8a80d5d04fab1b2a153ff23;hb=e64a84bb856263242278afa9770ae5d05e21b055;hp=3545eb13c83c4008cf797324421ef7b1068d3ca5;hpb=4d7015171fbd6c36c480d1d7992b76bbb45410c5;p=nageru diff --git a/futatabi/player.cpp b/futatabi/player.cpp index 3545eb1..0d9e092 100644 --- a/futatabi/player.cpp +++ b/futatabi/player.cpp @@ -50,6 +50,9 @@ void Player::thread_func(AVFormatContext *file_avctx) while (!should_quit) { play_playlist_once(); + if (done_callback != nullptr) { + done_callback(); + } } } @@ -322,9 +325,6 @@ void Player::play_playlist_once() if (should_quit) { return; } - if (done_callback != nullptr) { - done_callback(); - } // Start the next clip from the point where the fade went out. if (next_clip != nullptr) { @@ -332,10 +332,6 @@ void Player::play_playlist_once() in_pts_origin = next_clip->pts_in + lrint(next_clip_fade_time * TIMEBASE * clip.speed); } } - - if (done_callback != nullptr) { - done_callback(); - } } void Player::display_single_frame(int primary_stream_idx, const FrameOnDisk &primary_frame, int secondary_stream_idx, const FrameOnDisk &secondary_frame, double fade_alpha, steady_clock::time_point frame_start, bool snapped)