[FFmpeg-devel] [PATCH] incorrect return type for opt_bitrate/type safety
Wed Jan 2 00:25:22 CET 2008
during use I discovered that my -b and -vb options were rejected by ffmpeg. In
the `options' array, the `opt_bitrate' function is declared to be a OPT_FUNC2
handler, yet it void. OPT_FUNC2 handlers are supposed to return int, and
negative values for failures.
This is symptomatic of lack of type safety; the compiler could have warned about
passing an incorrect function pointer type if given the chance, but in every
case the pointers were casted to (void*). I have attached a patch which
establishes type safety in the `options' array, in addition to removing all the
warnings this caused.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 26730 bytes
Desc: not available
More information about the ffmpeg-devel