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

Glenn Maynard glenn
Thu Mar 22 19:12:05 CET 2007


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

The text of the warning is false--of course, it can still be constructed
with a struct initializer, even in C++.  But it does point to something a
little odd: the struct has a const char array member.  It's not the string
that's const, but the whole AVRtpPayloadTypes struct.  Patch attached to
remove the const from the array and move it to AVRtpPayloadTypes, which
makes the rest of the members const (and eliminates the warning as a bonus,
which is the only one the external headers are generating in VC8 for me).

Regarding XXX: is there a reason this isn't simply "const char *enc_name"?
It'd save a few K on that table.

-- 
Glenn Maynard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-rtp-const.diff
Type: text/x-diff
Size: 1022 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070322/4607a93a/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-rtp-const-alt.diff
Type: text/x-diff
Size: 1005 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070322/4607a93a/attachment-0001.diff>



More information about the ffmpeg-devel mailing list