[FFmpeg-devel] [RFC] libavutil split out

Michael Niedermayer michael at niedermayer.cc
Thu Oct 31 02:08:55 EET 2024


Hi

Theres a problem with libavutil, or maybe more than one

a library implementing a codec that tries do use libavutil and itself is
used by libavcodec. Creates a (build) dependancy like this
libavutil -> libmycodec -> libavcodec
Thats ok if libavutil is a seperate source but if libavutil and libavcodec
are in the same source package and are build together, well iam sure
you see this doesnt work
build ffmpeg first, theres no libmycodec,
build libmycodec first, theres no libavutil
now of course this can be worked around by building ffmpeg twice
But this is not documented, not suggested, not tested and not considered

of course myself spliting out libpostproc made me realize this issue. But
its a much broader problem than libpostproc. For libpostproc i can just
copy everything and remove all libavutil dependancies
And even without that it builds and works fine and all but only because i had
a prior build libavutil installed from before.

And thats not a freak exception, the same issue happens with a demuxer
lib trying to use libavutil or a device lib trying to use libavutil
or a filter trying to use libavutil.
They all need libavutil built first,

And i think we do want people to use libavutil, if for no other reason
than easy sharing of things like AV_PIX_FMT and other enums and defines
or the ability to pass AVFrames or reference stuff around with no wraping

So what do people prefer ?
Should we just docuemnt that packagers of distros should consider
building libavutil in s stage1 and the then everything else in a stage2
so they avoid circular dependancies

or should libavutil be split out into a seperate repository ?

or something else (like multimedia related libs not using libavutil
or copy and pasting everything from it) ?

or am i completely stupid and theres some other solution?

thx

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Nations do behave wisely once they have exhausted all other alternatives. 
-- Abba Eban
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20241031/64be0e40/attachment.sig>


More information about the ffmpeg-devel mailing list