[Ffmpeg-devel] [PATCH] const AVOption

Diego Biurrun diego
Wed Nov 1 21:40:56 CET 2006


On Wed, Nov 01, 2006 at 09:34:58PM +0100, Steve Lhomme wrote:
> Guillaume POIRIER wrote:
> >Hi,
> >
> >On 10/31/06, Michael Niedermayer <michaelni at gmx.at> wrote:
> >>On Mon, Oct 30, 2006 at 10:44:50PM +0100, Guillaume POIRIER wrote:
> >>> On 10/23/06, Steve Lhomme <slhomme at divxcorp.com> wrote:
> >>> >AVOption data usually don't need to be modified. This patch ensures 
> >>that.
> >>>
> >>> This patch doesn't seem to break anything here. Should I apply it 
> >>Michael?
> >>
> >>hmm, but what good does it do? are we applying patches just because they
> >>dont break anything?
> >
> >Mmm... no :-)
> >
> >>if adding these consts protects against some bugs then ill review it and
> >>wont object to it being applied but steve didnt claim that, so iam not
> >>sure ...
> >
> >Well in theory compilers are able to do some smarter things when some
> >values are made const...
> >In practice, I don't know what GCC or MSVC is able to do though.
> >
> >Steve, did you find any practical advantage of your patch?
> 
> No. Maybe it removed some warnings with MSVC.
> 
> But in the future if someone does something not legit with this stuff 
> that is supposed to be const, it will be seen very quickly...

Agreed.

Diego




More information about the ffmpeg-devel mailing list