[Ffmpeg-devel] [PATCH] Add allformats.h include file to move *_init() functions and other

Rich Felker dalias
Sat Jul 1 06:25:09 CEST 2006


On Fri, Jun 30, 2006 at 09:40:25AM +0200, Steve Lhomme wrote:
> Rich Felker wrote:
> >On Thu, Jun 29, 2006 at 10:37:28AM -0700, Mike Melanson wrote:
> >>Steve Lhomme wrote:
> >>>Is there a C compiler that fails on extern "C" ? At least among the
> >>>one(s) supported by FFMPEG.
> >>It's a moot issue since the extern is surrounded by "#ifdef __cplusplus".
> >
> >My point is that C++ code does not belong in a C project, even under
> >#ifdef!!! If a C++ project is doing interlanguage linking to C code,
> >then it should put the C headers inside its own 'extern "C"' block to
> >make this clear.
> 
> I agree. Except that libavcodec/libavformat are libraries. And the 
> library user (ie a programmer) shouldn't have to wonder if the C calling 
> convention or the C++ one has to be applied. Unless he has to check the 
> original source to see what is the original programming language.

Nonsense. There's no way you can use a library without knowing its
language. Anyway the language for any legitimate library is C.

> Anyway, it's not necessary on anything else than avcodec.h and avformat.h

Absolutely does not belong in them either!

Rich





More information about the ffmpeg-devel mailing list