File tree 3 files changed +17
-5
lines changed
3 files changed +17
-5
lines changed Original file line number Diff line number Diff line change
1
+ # 2.2.5 (unreleased)
2
+
3
+ Fixed:
4
+
5
+ - Handle invalid crossfade duration of ` 0. ` seconds.
6
+
7
+ ---
8
+
1
9
# 2.2.4 (2024-02-04)
2
10
3
11
New:
Original file line number Diff line number Diff line change 9
9
( homepage " https://github.com/savonet/liquidsoap" )
10
10
( bug_reports " https://github.com/savonet/liquidsoap/issues" )
11
11
12
- ( version 2 .2.4 )
12
+ ( version 2 .2.5 )
13
13
( generate_opam_files true )
14
14
( executables_implicit_empty_intf true )
15
15
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ class cross val_source ~duration_getter ~override_duration ~persist_override
44
44
* Going with the same choice as above for now. *)
45
45
method self_sync = s#self_sync
46
46
val mutable cross_length = 0
47
+ val mutable rejected_cross_length = None
47
48
val mutable duration_getter = original_duration_getter
48
49
method cross_duration = duration_getter ()
49
50
@@ -52,12 +53,15 @@ class cross val_source ~duration_getter ~override_duration ~persist_override
52
53
let main_new_cross_length = Frame. main_of_seconds new_cross_length in
53
54
54
55
if main_new_cross_length <> cross_length then
55
- if new_cross_length < 0. then
56
- self#log#important
57
- " Cannot set crossfade duration to negative value %f!"
58
- new_cross_length
56
+ if new_cross_length < = 0. then (
57
+ if rejected_cross_length <> Some new_cross_length then (
58
+ self#log#critical " Invalid cross duration: %.2f <= 0.!"
59
+ new_cross_length;
60
+ rejected_cross_length < - Some new_cross_length);
61
+ cross_length < - Lazy. force Frame. size)
59
62
else (
60
63
self#log#info " Setting crossfade duration to %.2fs" new_cross_length;
64
+ rejected_cross_length < - None ;
61
65
cross_length < - main_new_cross_length)
62
66
63
67
initializer self#set_cross_length
You can’t perform that action at this time.
0 commit comments