[FFmpeg-devel] [patch] allow wordexp globs in image2 file sequence import

Aurelien Jacobs aurel
Sun Jan 2 23:47:03 CET 2011


On Sun, Jan 02, 2011 at 12:59:34PM -0500, Brian Olson wrote:
> On Jan 1, 2011, at 6:42 PM, Aurelien Jacobs wrote:
> 
> >> +static int use_wordexp(VideoData *s) {
> >> +    return s->use_wordexp;
> >> +}
> > 
> > This function is just a useless and ugly indirection.
> > Drop it and access s->use_wordexp directly instead (get it out of
> > the ifdef).
> 
> It's either that or the altenately ugly
> #if HAVE_WORDEXP
> if (s->use_wordexp) {
>   // foo
> } else
> #endif
> {
>   // bar
> }

No. None of those !
s->use_wordexp should be used unconditionally. Not under any kind of
#if. And thus use_wordexp should always be part of the structure
definition so its definition shouldn't be under #if either.

Aurel



More information about the ffmpeg-devel mailing list