[FFmpeg-devel] [PATCH] Fix cmdutils.c build with --disable-swscale

Måns Rullgård mans
Wed Jan 27 13:58:44 CET 2010


M?ns Rullg?rd <mans at mansr.com> writes:

> Rafa?l Carr? <rafael.carre at gmail.com> writes:
>
>> Hi,
>>
>> Version & configuration are printed for each built library in cmdutils.c
>>
>> There is a #if CONFIG_lib conditional for avfilter and postproc already,
>> the patch just adds a conditional for swscale.
>>
>> Note: avdevice / avformat / avcodec can be disabled as well but I
>> didn't bother disabling them in configure to see all the places which
>> broke (for example when using AVCodecContext or AVFormatContext).
>
> If those are disabled, none of the ff* apps are built so there's no
> need to test for them.
>
>> Index: cmdutils.c
>> ===================================================================
>> --- cmdutils.c	(r??vision 21473)
>> +++ cmdutils.c	(copie de travail)
>> @@ -340,7 +340,9 @@
>>  #if CONFIG_AVFILTER
>>      PRINT_LIB_VERSION(outstream, avfilter, AVFILTER, indent);
>>  #endif
>> +#if CONFIG_SWSCALE
>>      PRINT_LIB_VERSION(outstream, swscale,  SWSCALE,  indent);
>> +#endif
>>  #if CONFIG_POSTPROC
>>      PRINT_LIB_VERSION(outstream, postproc, POSTPROC, indent);
>>  #endif
>> @@ -373,7 +375,9 @@
>>  #if CONFIG_AVFILTER
>>      maybe_print_config("libavfilter", avfilter_configuration());
>>  #endif
>> +#if CONFIG_SWSCALE
>>      maybe_print_config("libswscale",  swscale_configuration());
>> +#endif
>>  #if CONFIG_POSTPROC
>>      maybe_print_config("libpostproc", postproc_configuration());
>>  #endif
>
> This is starting to get a bit ifdef-heavy...

Fixed in a nicer way.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list