File tree 3 files changed +17
-6
lines changed
3 files changed +17
-6
lines changed Original file line number Diff line number Diff line change
1
+ == 6.0.2 2024-06-19
2
+
3
+ Fixes:
4
+ * Fixed a possible race condition that would cause the transcoder to time out even if the transcoder was still running
5
+
1
6
== 6.0.2 2024-06-18
2
7
3
8
Fixes:
Original file line number Diff line number Diff line change @@ -11,16 +11,21 @@ def self.start(duration, message = nil)
11
11
end
12
12
13
13
def pause
14
- @paused = true
14
+ @mutex . synchronize { @paused = true }
15
+ nil
15
16
end
16
17
17
18
def resume
18
- @paused = false
19
- tick
19
+ @mutex . synchronize do
20
+ @last_tick = Time . now
21
+ @paused = false
22
+ nil
23
+ end
20
24
end
21
25
22
26
def tick
23
- @last_tick = Time . now
27
+ @mutex . synchronize { @last_tick = Time . now }
28
+ nil
24
29
end
25
30
26
31
def cancel
@@ -33,6 +38,7 @@ def cancel
33
38
private
34
39
35
40
def initialize ( duration , message = nil )
41
+ @mutex = Mutex . new
36
42
@duration = duration
37
43
@message = message
38
44
@@ -43,7 +49,7 @@ def initialize(duration, message = nil)
43
49
end
44
50
45
51
def loop
46
- sleep 0.1 while @paused || Time . now - @last_tick <= @duration
52
+ sleep 0.1 while @mutex . synchronize { @ paused || Time . now - @last_tick <= @duration }
47
53
48
54
@current_thread . raise ( ::Timeout ::Error , @message || self . class . name )
49
55
end
Original file line number Diff line number Diff line change 1
1
# frozen_string_literal: true
2
2
3
3
module FFMPEG
4
- VERSION = '6.0.2 '
4
+ VERSION = '6.0.3 '
5
5
end
You can’t perform that action at this time.
0 commit comments