[Ffmpeg-devel] [PATCH] simplify libavformat/allformats.c

Aurelien Jacobs aurel
Sun Nov 26 19:18:26 CET 2006


On Sun, 26 Nov 2006 16:14:18 -0000 (GMT)
M?ns Rullg?rd <mru at inprovide.com> wrote:

> Aurelien Jacobs said:
> > Hi,
> >
> > Currently allformats.c contains more #ifdef lines than actual code.
> > The attached patch highly simplify this. It almost divides by 3 the
> > number of lines in this file.
> > I also took this oportunity to reorder lines alphabetically.
> > Ok to apply ?
> 
> Funny... I was just thinking something along the same lines.  I have
> two comments:
> 
> - The reordering should be a separate patch.

As everything is rewritten anyway, this wouldn't improve patch
readability at all. And it would be quite painful to find out
to old order again, and then to change back to alpha order.
Is it really worth ?

> - I'm not sure what I think of the combined muxer/demuxer lines.
>   It saves a few lines, but having them separate keeps things
>   clearer IMHO.

Idealy we would have a muxer *and* a demuxer for every format, so
yes, I think combined muxer/demuxer lines is a good thing.
There is already 38 occurance of such a line so it's already very
useful IMO.
Any other opinion about this ?

Aurel




More information about the ffmpeg-devel mailing list