[Ffmpeg-cvslog] r7608 - trunk/libavcodec/flashsv.c

Måns Rullgård mru
Sun Jan 21 22:15:39 CET 2007


Benjamin Larsson <banan at student.ltu.se> writes:

> Diego Biurrun wrote:
>
>>On Sun, Jan 21, 2007 at 06:48:03PM +0100, banan wrote:
>>  
>>
>>>Modified:
>>>   trunk/libavcodec/flashsv.c
>>>
>>>Log:
>>>Don't break compilation on systems without zlib.
>>>
>>>--- trunk/libavcodec/flashsv.c	(original)
>>>+++ trunk/libavcodec/flashsv.c	Sun Jan 21 18:48:03 2007
>>>@@ -49,6 +49,7 @@
>>> 
>>> #include <stdio.h>
>>> #include <stdlib.h>
>>>+#ifdef CONFIG_ZLIB
>>> #include <zlib.h>
>>> 
>>> #include "common.h"
>>>@@ -257,3 +258,4 @@
>>>     CODEC_CAP_DR1,
>>>     .pix_fmts = (enum PixelFormat[]){PIX_FMT_BGR24, -1},
>>> };
>>>+#endif //CONFIG_ZLIB
>>>    
>>>
>>
>>This is ugly and misleading.  If you depend on zlib, don't compile the
>>file if zlib is not available, i.e. move this check into the Makefile.
>
> I'd rather have configure finding out what to compile, currently
> allcodecs.c is scanned blindly and it doesn't care if CONFIG_ZLIB isn't
> defined. But if you want I can pollute libavcodec/Makefile with defines.

I've implemented some simple dependency checking in configure.  It
doesn't support multiple levels of dependencies, so don't push it.

> The way I did it now is the way other codecs do it.

They only do that when there is more than one codec in the same file.
Doing that of course only makes sense if they share most of the code.

-- 
M?ns Rullg?rd
mru at inprovide.com




More information about the ffmpeg-cvslog mailing list