[FFmpeg-devel] [PATCH] fix build with --disable-encoders

Michael Niedermayer michaelni
Sat Feb 23 21:44:05 CET 2008

On Sat, Feb 23, 2008 at 06:32:28PM +0000, M?ns Rullg?rd wrote:
> I really don't understand why Michael doesn't like placing stuff
> inside #ifdef CONFIG_ENCODERS.

Because its extra maintaince work and leads to hard to find bugs.
Just look in this thread,
it was about some code which ended up under that #ifdef which then
broke compilation with --disable-encoders. The first proposed fix (which
needed reviewing time) would have fixed it by disabling some png
decoding optimizations. If i would have missed that (possible, iam just
a human ...) --disable-encoders would have caused the decoders to be
mysteriously slower.

Without #ifdefs none of these problems would have occured. The warnings
can as well be suppressed by attribute unused or -wno-whatever.


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080223/46cb89d3/attachment.pgp>

More information about the ffmpeg-devel mailing list