[FFmpeg-devel] [PATCH] parse_options(): Avoid passing NULL as a string arg to fprintf
heydowns at somuchpressure.net
Fri Jun 24 19:11:09 CEST 2011
On Fri, 24 Jun 2011, Stefano Sabatini wrote:
> On date Friday 2011-06-24 04:48:29 +0200, Michael Niedermayer encoded:
> Yes, I relied on the GNU libc convention to print "(null)" when an
> argument is NULL, I suppose this is not portable so the patch should
> be fine. Can you say which libc are you using?
It's the Solaris-provided libc.
> > this bug sounds related to eb8bc57240d5d3e4680ff1df18a0a7792e96bd0c
> I suppose the right fix would be to change the signatures of the
> cmdutils.c:* function with the mismatching signatures, maybe prefix
> them with "opt_" to make clear that they're opt functions.
Yes. The other option that might be sensible if the functions employed
fall into the two broad categories of void f(void) and int f(char*, char*)
would be to use another flag to indicate the difference and cast
the fp appropriately, but if I read the above cited commit correctly this
is more or less what was moved away from.
If there are no additional comments in a day or so, I'll work on
converting the non-conforming functions to match the required signatures.
More information about the ffmpeg-devel