* 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.
- Previously 'av_make_error_string' was defined in FFmpegUtilities.h
for the sole purpose of redefining `av_err2str()` as a call to that
function. `av_err2str()` was then used in our code, often in string
contexts where its output was cast to `std::string`.
- Since that was excessively circular, instead the function is named
`av_err2string()`, and it's used directly in contexts where a
std::string is expected.
- `av_err2str()` is still #defined as `av_err2string(...).c_str()`