-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Refactor searching for the SOI marker of inline JPEG image streams #5508
Refactor searching for the SOI marker of inline JPEG image streams #5508
Conversation
looks like a great fix if regression tests pass. you have the power to trigger botio? |
/botio test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://107.22.172.223:8877/92b0b550592296e/output.txt |
From: Bot.io (Linux)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/93fe40c417a2890/output.txt |
From: Bot.io (Windows)FailedFull output at http://107.22.172.223:8877/92b0b550592296e/output.txt Total script time: 3.26 mins
Image differences available at: http://107.22.172.223:8877/92b0b550592296e/reftest-analyzer.html#web=eq.log |
@yurydelendik Could you kick the Windows bot again? |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/93fe40c417a2890/output.txt Total script time: 23.93 mins
|
/botio-windows test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @yurydelendik received. Current queue size: 0 Live output at: http://107.22.172.223:8877/3fa0e8ff163f33f/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/3fa0e8ff163f33f/output.txt Total script time: 20.27 mins
|
// Some images may contain 'junk' before the SOI (start-of-image) marker. | ||
// Note: this seems to mainly affect inline images. | ||
var ch; | ||
while ((ch = stream.getByte()) !== 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is '1' a typo? looks like it shall be '-1' (EOF). if it's -1, make if ch < 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that should have been -1
. I have no idea how I missed that, thanks for noticing!
/botio-linux test |
From: Bot.io (Linux)ReceivedCommand cmd_test from @yurydelendik received. Current queue size: 5 Live output at: http://107.21.233.14:8877/db726113e2ab2cc/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/db726113e2ab2cc/output.txt Total script time: 23.92 mins
|
Refactor searching for the SOI marker of inline JPEG image streams
Thank you |
This patch refactors the approach used in PR #5286 to be more generic (and also let us remove one
TODO
from the codebase).