[Ffmpeg-devel] [PATCH] rtp.h warning

Måns Rullgård mans
Thu Mar 22 21:37:00 CET 2007


Glenn Maynard <glenn at zewt.org> writes:

> On Thu, Mar 22, 2007 at 03:10:21PM -0500, Rich Felker wrote:
>> On Thu, Mar 22, 2007 at 02:12:05PM -0400, Glenn Maynard wrote:
>> > rtp.h generates this in VC:
>> > 
>> > include\ffmpeg\rtp.h(99) : warning C4510: 'avcodec::AVRtpPayloadType_s' :
>> > default constructor could not be generated
>> > warning C4610: struct 'avcodec::AVRtpPayloadType_s' can never be
>> > instantiated - user defined constructor required
>> 
>> This is C code, not C++ code. Of course it should not be expected to
>> compile as C++ code..
>
> It's a C library; the external headers should compile in C++ code.

It's a C library, its headers are C, and they need not at all compile
as C++.  Despite the common misconception, C is *not* a subset of C++.

> (The warning is wrong, even in C++, but the oddity that's triggering
> it seems reasonable to fix anyway, unless those other fields really
> are meaant to be non-const.)

That I agree with.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list