bugfix: better check for invalid video import
Sometimes videos can have invalid streams alongside valid video streams. This patch checks if the invalid stream is a video, and only then does it mark it as an invalid format.
Fixes: https://krita-artists.org/t/importing-video-for-animation/4390
Test Plan
-
File-> Import Video Animation
-
Pick any file that has invalid stream data, here is one such sample: FFMpegTest
It should import correctly.
- Pick a file that would be invalid, like webp.(you have to select all files in the dialog), it should give an error of format being invalid.
Formalities Checklist
-
I confirmed this builds. -
I confirmed Krita ran and the relevant functions work. -
I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!) -
I made sure my commits build individually and have good descriptions as per KDE guidelines. -
I made sure my code conforms to the standards set in the HACKING file. -
I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.