Skip to content

Commit ab55925

Browse files
fix test
1 parent 4b620a2 commit ab55925

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/writing.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ end
200200
@testset "Encoding video with float frame rates" begin
201201
n = 100
202202
fr = 29.5 # 59 // 2
203-
target_dur = n / fr
203+
target_dur = round(n / fr, digits = 6) # ffmpeg uses 6 digits of precision
204204
@testset "Encoding with frame rate $(float(fr))" begin
205205
imgstack = map(x -> rand(UInt8, 100, 100), 1:n)
206206
encoder_options = (color_range = 2, crf = 0, preset = "medium")
@@ -211,6 +211,6 @@ end
211211
command = VideoIO.FFMPEG.ffprobe,
212212
collect = true,
213213
)
214-
@test parse(Float64, measured_dur_str[1]) target_dur
214+
@test parse(Float64, measured_dur_str[1]) == target_dur
215215
end
216216
end

0 commit comments

Comments
 (0)