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 seekbar crashing on drag with faulty frameset #11596

Merged

Conversation

Thompson3142
Copy link
Contributor

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

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

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

@github-actions github-actions bot added the size/medium PRs with less than 250 changed lines label Oct 6, 2024
@ShareASmile ShareASmile added bug Issue is related to a bug player Issues related to any player (main, popup and background) labels Oct 7, 2024
@TobiGr
Copy link
Contributor

TobiGr commented Oct 27, 2024

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]>
@Thompson3142 Thompson3142 force-pushed the fix_scrubbing_seekbar_preview_crash branch from 31d6027 to ba1e9c8 Compare October 27, 2024 13:25
@github-actions github-actions bot added size/small PRs with less than 50 changed lines and removed size/medium PRs with less than 250 changed lines labels Oct 27, 2024
Copy link
Contributor

@TobiGr TobiGr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

@Thompson3142
Copy link
Contributor Author

@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!

Copy link

@TobiGr TobiGr merged commit cdac50b into TeamNewPipe:dev Oct 27, 2024
6 checks passed
@Stypox Stypox mentioned this pull request Nov 17, 2024
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug player Issues related to any player (main, popup and background) size/small PRs with less than 50 changed lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Preview seekbar thumbnail causing crash while scrubbing on some specific YouTube videos
3 participants