[FFmpeg-devel] [PATCH] drawtext: fix hard dependency to lavc (timecode).
nicolas.george at normalesup.org
Thu Dec 29 15:51:40 CET 2011
Le nonidi 9 nivôse, an CCXX, Clément Bœsch a écrit :
> Is it ok to include libavcodec stuff and just avoid calling functions when
> it is disabled?
I do not think that building libavfilter separately from the ffmpeg source
tree is supported: therefore, including any header and using things that are
completely contained in the headers (structures definitions, macros, inline
functions, prototypes, etc.) is probably ok.
As for "avoid calling functions", is is not just that. If you write:
then the compiler will generate code to call foo, and the linker will
complain that foo is not defined. On the other hand, if this time your test
uses AVCODEC_ENABLED, i.e., a build-time constant, then the compiler will
just not generate the code to call foo at all.
Note that theoretically, this will break on very very stupid compilers. But
obviously we do not really care, as this construct is used all over the
place, especially in allcodecs.c, allformats.c and co.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel