Repository navigation
fix(audio): add length check for MLT track loading - #3512
Conversation
1a5f42c to
5214d71
Compare
|
@rodolforg Could you please review this PR? Thanks! |
|
Thank you for attempting to improve your contribution description! 🐞 Bug Fixes
|
Synfig can import a variety of audio formats (depending on the loaded plugins and their capabilities), so checking the file header might not be sufficient. A more accurate approach to solving the problem is to ask the plugin whether it managed to load the file or not. In this case, we are using the MLT framework to load files. if (!track->get_producer() || track->get_length() <= 0) {I have output additional details to see which parameters could be used to add another condition. Here is the output for this file (based on the information provided by MLT library): Duration (frames): 2147483647
Frame rate: 25
Sample rate: 0
Channels: 0I suggest adding an additional check based on the |
|
Okay, done thanks for the clarification |
|
Looks good. Please fix the PR description to better match the changes made. |
|
Thank you for attempting to improve your contribution description! 🐞 Bug Fixes
|
|
Thank you for attempting to improve your contribution description! 🐞 Bug Fixes
|
|
done |
|
Interesting.
|
Added issue: mltframework/mlt#1073 |
The additional check based on the Hopefully, this resolves the problem. Please let me know if any further changes are needed. |
I suggest removing this check since it doesn't work, to avoid cluttering the code. I also suggest getting rid of the magic number (2147483647) and doing something like this (to improve clarity). // That value is INT_MAX, which is our special value that means unknown or possibly a live source.
// https://github.com/mltframework/mlt/issues/1073#issuecomment-2730111264
constexpr int mlt_error_length = INT_MAX; |
|
Thank you for attempting to improve your contribution description! 🐞 Bug Fixes
|
1 similar comment
|
Thank you for attempting to improve your contribution description! 🐞 Bug Fixes
|
added a commit : ) |
|
It failed last time because the self-hosted runner was offline. |
Fixes #3484