-
-
Notifications
You must be signed in to change notification settings - Fork 3.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
Fix seekbar crashing on drag with faulty frameset #11596
Fix seekbar crashing on drag with faulty frameset #11596
Conversation
app/src/main/java/org/schabi/newpipe/player/seekbarpreview/SeekbarPreviewThumbnailHolder.java
Outdated
Show resolved
Hide resolved
LGTM, but needs a rebase due to resolve the conflict caused by your other PR. I currently lost track of all the contributions that are part of courses at universities. Please let me know if you are an ANU student for internal statistics and because I am writing my master thesis about open source contributions as part of learning computer science and computer science education at university. |
Co-authored-by: Tobi <[email protected]>
31d6027
to
ba1e9c8
Compare
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.
thanks
@TobiGr Ah forgot about that, should be fine now? Am not an ANU student so you can cross me of your list, good luck with your thesis anyway! |
Quality Gate passedIssues Measures |
What is it?
Description of the changes in your PR
Youtubes api seems to have VERY rarely "broken" preview storyboards i.e. storyboards that are too small for the given amount of frames on the x axis and width of frames. In the linked issue only the width seems to be affected but i assume the same could happen to the height.
As an example for this video https://www.youtube.com/watch?v=sxl4DJXCDzA (jumpscare/loud sound warning) the api returns this storyboard https://i.ytimg.com/sb/sxl4DJXCDzA/storyboard3_L2/M0.jpg?sqp=-oaymwENSDfyq4qpAwVwAcABBqLzl_8DBgiPyu6jBg==&sigh=rs$AOn4CLD0HwvNS2nXMr9JYlzeuRbC1ubbtg which should have 5 160 pixel wide frames (which is 800 pixels). The image is only 795 pixels wide so it breaks at some point when trying to create a bitmap for the preview.
For this video https://www.youtube.com/watch?v=CH50zuS8DD0 the storyboard is correctly sized: https://i.ytimg.com/sb/CH50zuS8DD0/storyboard3_L2/M0.jpg?sqp=-oaymwENSDfyq4qpAwVwAcABBqLzl_8DBgikqp23Bg==&sigh=rs$AOn4CLBG_KgXP0R2Z1DI9hg-Ntn7xCnrXA.
Seems to be a youtube sided thing, i don't see any issues on the extractor side (but I could be wrong about that of course). The only "solution" i found was to catch these cases and "manually" and adjust the bounds of the preview, even though i am not super happy with that approach. There seems to be no pattern (same video length for example) behind this behaviour but this statement comes with a very small sample size so I might have missed something.
Fixes the following issue(s)
Relies on the following changes
For this PR only line 171-181 are relevant
APK testing
The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.
Due diligence