prevent reverse playback going below zero

This commit is contained in:
itsmattkc
2019-02-02 10:59:10 +11:00
parent d5df44c349
commit 2849e552ab
+4 -2
View File
@@ -768,12 +768,14 @@ void Viewer::update_playhead() {
void Viewer::timer_update() {
previous_playhead = seq->playhead;
seq->playhead = qRound(playhead_start + ((QDateTime::currentMSecsSinceEpoch()-start_msecs) * 0.001 * seq->frame_rate * playback_speed));
seq->playhead = qMax(0, qRound(playhead_start + ((QDateTime::currentMSecsSinceEpoch()-start_msecs) * 0.001 * seq->frame_rate * playback_speed)));
if (config.seek_also_selects) panel_timeline->select_from_playhead();
update_parents(config.seek_also_selects);
if (playing) {
if (recording) {
if (playback_speed < 0 && seq->playhead == 0) {
pause();
} else if (recording) {
if (recording_start != recording_end && seq->playhead >= recording_end) {
pause();
}