- CppCheck was complaining about unreleased resources for FILE*. They weren't
really because they get flushed and closed when program exits normally, but
let's close them anyway.
Quote from MALLOC(3) manpage:
The realloc() function returns a pointer to the newly allocated memory, which is suitably aligned for any kind of
variable and may be different from ptr, or NULL if the request fails.
- Also set default width and height to 0 because it makes no sense to assume
dimensions. It's kind of like defaulting to the most common altitude when
the altimeter is broken.
- Add config_validate to have a place for checks on overall cfg state.
Related to issue #12.
Motivation for adding this is that the syntax for frame accurate seeking in
ffmpeg is a little cumbersome. Also it's kind of a standard feature I guess.
- Working towards issue #11.
- Widened datatypes for cfg struct members that take values from atoi to full
ints so that bounds checking can be done after parsing without overflow.
The clean up of input parsing and encoder initialization code had caused the
real source input dimensions to be used for array initialization, instead of
the dimensions modified to be multiples of the smallest coding unit.
- Change stderr back to text mode. Can't see what harm it should allow us to print
correct newlines for different platforms.
- Remove copy-pasted function calls from usage printing.