Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix one instance of type instability within VideoReader #257

Merged

Conversation

galenlynch
Copy link
Collaborator

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
Copy link

codecov bot commented Aug 11, 2020

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
Copy link
Member

CI failure here was a download blip

@IanButterworth IanButterworth merged commit 2b91e6c into JuliaIO:master Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants