]> git.sesse.net Git - nageru/commitdiff
Fix the previous fix for the infinite display; it was causing crashes and odd stuff...
authorSteinar H. Gunderson <steinar+nageru@gunderson.no>
Wed, 30 Oct 2019 22:55:17 +0000 (23:55 +0100)
committerSteinar H. Gunderson <steinar+nageru@gunderson.no>
Wed, 30 Oct 2019 22:55:17 +0000 (23:55 +0100)
futatabi/mainwindow.cpp
futatabi/player.cpp

index 9885232eb1f4ea3e60d244ef0c4d1272151e00cb..f55ad0e489083572e9d86fa80e0dd2f8c749d656 100644 (file)
@@ -445,9 +445,6 @@ void MainWindow::queue_clicked()
        } else {
                clip.stream_idx = ui->preview_display->get_stream_idx();
        }
-       if (clip.pts_out == -1) {
-               clip.pts_out = clip.pts_in + int64_t(TIMEBASE) * 86400 * 7;  // One week; effectively infinite, but without overflow issues.
-       }
 
        playlist_clips->add_clip(clip);
        playlist_selection_changed();
index 910377a8236fb3a323bdc1b4559328b50725e5fe..f427d0566d1fd2c9eb24c6556adb32aeb5375362 100644 (file)
@@ -628,7 +628,7 @@ TimeRemaining compute_time_left(const vector<ClipWithID> &clips, size_t currentl
        for (size_t row = currently_playing_idx; row < clips.size(); ++row) {
                const Clip &clip = clips[row].clip;
                double clip_length = double(clip.pts_out - clip.pts_in) / TIMEBASE / clip.speed;
-               if (clip_length >= 86400.0) {  // More than one day.
+               if (clip_length >= 86400.0 || clip.pts_out == -1) {  // More than one day.
                        ++remaining.num_infinite;
                } else {
                        if (row == currently_playing_idx) {