[FFmpeg-devel] [PATCH] Document sws_freeContext()

Stefano Sabatini stefano.sabatini-lala
Mon Nov 2 21:14:51 CET 2009


On date Monday 2009-11-02 11:58:08 +0100, Michael Niedermayer encoded:
> On Mon, Nov 02, 2009 at 01:58:50AM +0100, Vitor Sessak wrote:
> > Michael Niedermayer wrote:
> >> On Mon, Nov 02, 2009 at 12:30:16AM +0100, Stefano Sabatini wrote:
> >>> Hi, as in subject.
> >>> -- 
> >>> FFmpeg = Fantastic & Fast Mysterious Philosophical Elitarian Governor
> >>>  swscale.h |    4 ++++
> >>>  1 file changed, 4 insertions(+)
> >>> 76c99c975c1aa2f36453e7d11a6e2c8d8f6f8dc2  document-sws-free-context.patch
> >>> Index: libswscale/swscale.h
> >>> ===================================================================
> >>> --- libswscale/swscale.h	(revision 29810)
> >>> +++ libswscale/swscale.h	(working copy)
> >>> @@ -112,6 +112,10 @@
> >>>   struct SwsContext;
> >>>  +/**
> >>> + * Frees the memory allocated by swsContext.
> >>> + * If swsContext is NULL, then do nothing.
> >> sounds odd, id say either
> >> free + do
> >> or
> >> frees + does
> >> (just gut feeling)
> >> Also it does not just free memory and not what has been
> >> allocated by swsContext, as thats a struct and not a function
> >> that does something.
> >> really i think that "frees a swscaler context" is perfectly fine
> >
> > Wouldn't that be a little redundant with the function name 
> > (sws_freeContext)? I would just make:
> >
> > /**
> >  * @note If swsContext is NULL, then do nothing.
> >  */
> >
> > or
> >
> > /**
> >  * @note It is safe to pass NULL pointers to this function.
> >  */
> >
> > Or something like that...
> 
> thats perfectly fine with me as well

I have a slight preference for keeping a description of the function,
but I'll drop it if someone will insist, and fixed the grammatical
inconsistence pointed out by Michael.

New patch attached.
-- 
FFmpeg = Fundamentalist and Friendly Mastering Power EnGraver
-------------- next part --------------
A non-text attachment was scrubbed...
Name: document-sws-free-context.patch
Type: text/x-diff
Size: 383 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091102/fcf2961a/attachment.patch>



More information about the ffmpeg-devel mailing list