- Replace all juce::CriticalSection with std::recursive_mutex
- Replace all juce::AudioSampleBuffer with juce::AudioBuffer<float>
- Eliminate implicit reliance on 'using namespace juce;'
- Replace OpenShotAudio.h includes with targeted juce modules
* reuse-managed license/copyright headers
reuse is a tool for compliance with the REUSE recommendations. See
<https://reuse.software/> for more information, and
<https://reuse.readthedocs.io/> for the online documentation.
* Set jsoncpp license
* Add MIT license for Decklink sources
* Explicitly license examples/
- Add headers to source files
- Change blanket licensing in .reuse/dep5 to only cover binary media
- Import CC-BY-3.0 license and assign to sintel_trailer
* Protect values against integer overflow
When the code multiplies integer values in an rvalue context before
it's stored in a larger type, the on-the-fly math is stored as int.
The value can overflow before it reaches the wider memory space.
To prevent this, we explicitly cast the result of the arithmetic
to the destination type.
Issues flagged by GitHub CodeQL.
* Apply these fixes correctly
When the code multiplies integer values in an rvalue context before
it's stored in a larger type, the on-the-fly math is stored as int.
The value can overflow before it reaches the wider memory space.
To prevent this, we explicitly cast the result of the arithmetic
to the destination type.
Issues flagged by GitHub CodeQL.
- Parsing from string to Json::Value is now done by utility function
openshot::stringToJson() in Json.cpp, all SetJson() methods call it.
- Expand use of const member functions and args where appropriate.
- Use std::to_string() to format int/float values as strings.
- Correct mentions of nonexistent Json::JsonValue type in docstrings
`Json::Reader` has been deprecated for some time, so we replace it with
`Json::CharReader` generated by a `Json::CharReaderBuilder`, or (in the
one instance where we have a stream as input) `Json::parseFromStream();`
- each class is now responsible to free whatever it allocates
- all tests passed on my machine with ffmpeg 3.2
- Clip is now more careful about freeing a reader if it allocated it as well