JuliaIO / VideoIO.jl

Reading and writing of video files in Julia via ffmpeg
https://juliaio.github.io/VideoIO.jl/stable
Other
126 stars 53 forks source link

Fix one instance of type instability within VideoReader #257

Closed galenlynch closed 4 years ago

galenlynch commented 4 years ago

In VideoReader's constructor, aspect_ratio is either set to the aspect ratio from the codec context, which is converted into a Rational{Cint}, or instead 0 // 1 if the denominator is zero, which is a Rational{Int}. This causes unceccessary type instability, which can be fixed by instead making aspect_ratio = Cint(0) // Cint(1) if the denominator is zero.

codecov[bot] commented 4 years ago

Codecov Report

Merging #257 into master will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #257   +/-   ##
=======================================
  Coverage   77.09%   77.09%           
=======================================
  Files          14       14           
  Lines         598      598           
=======================================
  Hits          461      461           
  Misses        137      137           
Impacted Files Coverage Δ
src/avio.jl 79.15% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d2166e5...d7d5e92. Read the comment docs.

IanButterworth commented 4 years ago

CI failure here was a download blip