[FFmpeg-devel] [PATCH] make img_convert symbol conditional on lavc version, not libswscale

Diego Biurrun diego
Thu Jun 5 09:52:13 CEST 2008


On Thu, Jun 05, 2008 at 12:38:11AM -0700, Baptiste Coudurier wrote:
> 
> Diego Biurrun wrote:
> > On Tue, Jun 03, 2008 at 01:46:18PM +0200, Diego Biurrun wrote:
> >> Currently we declare img_convert() in avcodec.h conditional to
> >>
> >> #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
> >>
> >> However, in imgconvert.c, img_convert is defined conditional to
> >>
> >> #ifndef CONFIG_SWSCALE
> >>
> >> so that img_convert() is not available when compiling with swscale
> >> enabled although it is declared in avcodec.h.
> >>
> >> Here is a patch to change the condition in imgconvert.c, which I believe
> >> is the correct solution.
> > 
> > I will commit this tomorrow unless I hear objections.
> 
> imgresample.c uses img_convert, is it safe ?

That is indeed a problem, but separate from the one my patch addresses.
The header promises the symbol conditional on lavc version, so the
implementation must IMO follow.  We cannot make a condition based on
CONFIG_SWSCALE in avcodec.h because installed headers do not #include
config.h.

The alternative seems to be making img_convert unconditionally
available in the implementation.

Diego




More information about the ffmpeg-devel mailing list