[FFmpeg-devel] FFmpeg source code is no longer C99 because of GNUism called case ranges

Roman Shaposhnik rvs
Sat Jul 7 23:04:06 CEST 2007


Hi,

On Fri, 2007-07-06 at 10:37 +0200, Reimar D?ffinger wrote:
> Hello,
> On Thu, Jul 05, 2007 at 09:01:12PM -0700, Roman Shaposhnik wrote:
> > On Thu, 2007-07-05 at 11:37 +0200, Michael Niedermayer wrote:
> > > > +    else if (avctx->sub_id == 0x20001000 ||
> > > > +             (avctx->sub_id >= 0x20100000 && avctx->sub_id < 0x201a0000)) {
> > > > +        s->low_delay=1;
> > > 
> > > vertical align
> > 
> >   Do you want me to re-align the expression (avctx->...) or the
> > statement (s->low_delay=1;) ?
> 
> IIRC Micheal prefers the ifs like that:
>  else if (    avctx->sub_id == 0x20001000
>           || (avctx->sub_id >= 0x20100000 && avctx->sub_id < 0x201a0000))

  Well, hopefully this is the same thing Michael had in mind ;-) But we
are supposed to find out soon.

> But a space before and after the '=' of the assignment wouldn't be bad
> either IMO ;-)

  True. But that would break diff'ing (unless of course we were to use
diff -b).

> P.S.: Thanks for taking this on, I wanted it to do long ago but always
> have more interesting stuff to do ;-)

  Sure. I actually do have a couple of similar things on my list to make
FFmpeg source code even more compiler neutral. Stay tuned.

Thanks,
Roman.





More information about the ffmpeg-devel mailing list