[FFmpeg-devel] [PATCH] Make AVRtpPayloadTypes static and constant

Luca Abeni lucabe72
Sat Jan 5 18:48:44 CET 2008

Hi Michael,

On Sat, 2008-01-05 at 18:20 +0100, Michael Niedermayer wrote:
> > > I'm all in favour of this change
> > 
> > Double thinking about it, I have some doubts about the "const" part. I
> > agree that right now AVRtpPayloadTypes is not modified by ffmpeg's code,
> > but I suspect that if rtp_get_payload_type() does not find a PT and a
> > dynamic PT is used, then the corresponding entry in AVRtpPayloadTypes
> > should be modified... Otherwise, there is no point in having the entries
> > > 35 in the table.
> It is absolutely not possible to change any entry in any global or static
> table. This would totally break multithreaded apps.

Uhmmm... You are right (as usual :)... But then I think
AVRtpPayloadTypes is misdesigned: why having 128 entries? And, what's
the purpose of the "dynamic" entries from pt 96 to 127? (since the table
cannot be modified, the only useful entries seem to be the first 35,

> That said, the table should be const. If the type is const or not as another
> question.

Well, in this case the "const" qualifier looks ok, and I think the patch
can be applied.

> And rtp.h should not be installed IIRC
> And any application depending on anything from it is broken, this stuff is
> not part of the public API IMHO

Some months ago I proposed to avoid installing rtp.h, and I was told
that it is needed. If this is not true, and rtp.h is not part of the
public API, then I am ok with the patch (and we should remove it from
the installed headers).


More information about the ffmpeg-devel mailing list