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

probe: add check for jpeg/mpeg type of inputs #451

Merged
merged 2 commits into from
Feb 12, 2023

Conversation

emranemran
Copy link
Collaborator

Any single jpeg input file may get classified as an mjpeg in the probing logic. These inputs are not supported currently. This change adds a check for mjpeg type of inputs and fails the probe check.

Any single jpeg input file may get classified as an mjpeg in the probing logic.
These inputs are not supported currently. This change adds a check for
mjpeg type of inputs and fails the probe check.
@codecov
Copy link

codecov bot commented Feb 10, 2023

Codecov Report

Merging #451 (18add64) into main (31e8bd8) will increase coverage by 0.27351%.
The diff coverage is 100.00000%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##                main        #451         +/-   ##
===================================================
+ Coverage   55.40114%   55.67465%   +0.27351%     
===================================================
  Files             39          39                 
  Lines           3166        3172          +6     
===================================================
+ Hits            1754        1766         +12     
+ Misses          1266        1260          -6     
  Partials         146         146                 
Impacted Files Coverage Δ
video/probe.go 13.48315% <100.00000%> (+13.48315%) ⬆️

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 31e8bd8...18add64. Read the comment docs.

Impacted Files Coverage Δ
video/probe.go 13.48315% <100.00000%> (+13.48315%) ⬆️

@thomshutt
Copy link
Contributor

@emranemran Looks good, I also added some unit tests (and from running them noticed that we'd also return the mjpeg error if the source video codec string was empty, so changed it to an equality rather than Contains check)

@thomshutt thomshutt merged commit 2eb7216 into main Feb 12, 2023
@thomshutt thomshutt deleted the emran/reject-image-inputs branch February 12, 2023 19:39
@emranemran
Copy link
Collaborator Author

@emranemran Looks good, I also added some unit tests (and from running them noticed that we'd also return the mjpeg error if the source video codec string was empty, so changed it to an equality rather than Contains check)

Got it. Nice catch.

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