]> git.sesse.net Git - nageru/commitdiff
Fix fades into overly short clips.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 27 Oct 2018 20:18:17 +0000 (22:18 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 28 Oct 2018 00:08:45 +0000 (02:08 +0200)
player.cpp

index dd37143fb497a5035ece9456d101912e045ca251..2fef0735c24d0a817357244b8cd3c9c671b4913f 100644 (file)
@@ -145,7 +145,7 @@ got_clip:
                        int64_t secondary_pts = -1;
                        int64_t in_pts_secondary = -1;
                        float fade_alpha = 0.0f;
-                       if (got_next_clip) {
+                       if (got_next_clip && time_left_this_clip <= next_clip_fade_time) {
                                secondary_stream_idx = next_clip.stream_idx;
                                in_pts_secondary = lrint(next_clip.pts_in + (next_clip_fade_time - time_left_this_clip) * TIMEBASE * speed);
                                fade_alpha = 1.0f - time_left_this_clip / next_clip_fade_time;