From 0e0d208ecefe0c0730697e4810867bb98c8741ee Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 27 Oct 2018 22:18:17 +0200 Subject: [PATCH] Fix fades into overly short clips. --- player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/player.cpp b/player.cpp index dd37143..2fef073 100644 --- a/player.cpp +++ b/player.cpp @@ -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; -- 2.39.2