[FFmpeg-devel] [PATCH] avcodec/libx264: don't define X264_API_IMPORTS when compiling static

Soft Works softworkz at hotmail.com
Fri May 20 13:39:53 EEST 2022



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of Timo
> Rothenpieler
> Sent: Friday, May 20, 2022 12:18 PM
> To: ffmpeg-devel at ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH] avcodec/libx264: don't define
> X264_API_IMPORTS when compiling static
> 
> On 20/05/2022 00:52, softworkz wrote:
> > From: softworkz <softworkz at hotmail.com>
> >
> > The definition of X264_API_IMPORTS is required for shared linking
> > (when MSVC is used) but it must not be defined in case of static
> > builds as is stated in x264.h:
> 
> This doesn't seem right. It's about shared or static linking of
> libx264
> itself, not ffmpeg.

How about some custom macro like DISABLE_X264_API_IMPORTS that one
can set when desired?

In that case there wouldn't be any logical irritation.


> The correct flag should come via pkg-config at configure time.


There has been a patch which does that, but it didn't go anywhere:

https://ffmpeg.org/pipermail/ffmpeg-devel/2021-October/287426.html

That's why I wanted something straight and simple which doesn't 
hurt anybody.



Thanks,
softworkz


More information about the ffmpeg-devel mailing list