On Tue, 10 Dec 2024, Scott Theisen wrote:

ff_* symbols are not exported and are internal to each library. Some of the other libraries `#include "libavutil/reverse.c"` in a file.  Should ff_reverse be renamed avpriv_reverse so that is not necessary?

No, this is intentionally done this way.

If we'd make it into avpriv_reverse, then we'd also need to distinguish between whether we're accessing it from within the same library where it is defined, or mark the declaration with dllimport, if building shared libraries with MSVC.

Back when ffmpeg was made to support MSVC and building shared libraries with it, we decided not to try to add dllimport for it; these tables are miniscule anyway. So if building shared libraries, we instead duplicate the tables within each shared library that uses them.

(Later we did end up adding selective dllimport for cross-library tables anyway though. But we tend to prefer to avoid avpriv symbols if possible, as they're effectively part of the ABI surface even if they're supposed to be private.)

In any case - just replicate the existing pattern for duplicating reverse.c into libavformat, like is done in the other libraries that use the symbol; changing how it is set up is a much larger discussion.

// Martin
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to