On Fri, 13 Jan 2017 13:29:55 +0100 Anton Khirnov <[email protected]> wrote:
> Quoting wm4 (2017-01-13 12:09:23) > > On Fri, 13 Jan 2017 12:04:36 +0100 > > Anton Khirnov <[email protected]> wrote: > > > > > Before this commit, AVIOContext is to be freed with a plain av_free(), > > > which prevents us from adding any deeper structure to it. > > > --- > > > doc/APIchanges | 3 +++ > > > libavformat/avio.h | 8 ++++++++ > > > libavformat/aviobuf.c | 17 ++++++++++++++--- > > > libavformat/version.h | 4 ++-- > > > 4 files changed, 27 insertions(+), 5 deletions(-) > > > > > > diff --git a/doc/APIchanges b/doc/APIchanges > > > index c8c2a21..1cab9f4 100644 > > > --- a/doc/APIchanges > > > +++ b/doc/APIchanges > > > @@ -13,6 +13,9 @@ libavutil: 2015-08-28 > > > > > > API changes, most recent first: > > > > > > +2016-xx-xx - xxxxxxx - lavf 57.11.0 - avio.h > > > + Add avio_context_free(). From now on it must be used for freeing > > > AVIOContext. > > > + > > > > As an API user I'm saying "lol no". This implicitly breaks every API > > user without warning, and you'd only know once it actually breaks (and > > you've spent a few hours of debugging). Unless you read APIchanges, > > which not many are likely to do. > > I'm not breaking anything just yet, and not planning to in the immediate > future. The (preliminary) transition plan I have in mind involved > deprecating avio_alloc_context() and replacing it with > avio_context_alloc(), with a properly big-endian-namespaced name and > most likely a different signature. That will give you all the > deprecation warnings you want. The exact shape of that new API is to be > determined, but it seemed to me that it's best to add the destructor as > soon as possible, since the API for that is very straightforward. Uh, ok, I guess that works. > (also, if you're a libav API user and don't read APIchanges at least > once per major bump then you deserve everything you get =p) > Even if I do I can miss something like that easily. In general I don't really think you can expect users to read that, unless you present it on a golden tablet on every major release. _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
