[Ffmpeg-devel] [PATCH 5/9] Doxygenize av_realloc_static comments

Michael Niedermayer michaelni
Thu Feb 22 18:56:54 CET 2007


Hi

On Thu, Feb 22, 2007 at 04:50:00PM +0100, Panagiotis Issaris wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi,
> 
> Michael Niedermayer schreef:
> > On Thu, Feb 22, 2007 at 03:43:49AM +0100, Panagiotis Issaris wrote:
> >> The attached patch "doxygenizes" the comments for the 
> >> av_realloc_static() function.
> >>
> >> avcodec.h |    7 +++++--
> >> 1 file changed, 5 insertions(+), 2 deletions(-)
> >>
> >> With friendly regards,
> >> Takis
> >>
> > 
> >> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> >> index f143282..7117082 100644
> >> --- a/libavcodec/avcodec.h
> >> +++ b/libavcodec/avcodec.h
> >> @@ -2893,7 +2893,11 @@ void av_free_static(void);
> >>  void *av_mallocz_static(unsigned int size);
> >>  
> >>  /**
> >> - * same as above, but does realloc
> >> + * Same as av_mallocz_static(), but does a realloc.
> >> + *
> >> + * @param[in] ptr The block of memory to reallocate.
> >> + * @param[in] size The requested size.
> >> + * @return Block of memory of requested size.
> >>   */
> >>  void *av_realloc_static(void *ptr, unsigned int size);
> > 
> > av_*alloc_static are internal functions they should not be in avcodec.h
> > and should not have an av_ prefix
> > 
> > [...]
> Okay, can apply the doxygenizing patch first and then prepare a separate
> patch for moving it to a different file and removing the av_ prefix?

ok


> 
> The only match on on av_*alloc_static I got was av_realloc_static:
> find -name "*.[ch]" -exec grep -H "av_.*alloc_static" {} \;
> ./libavcodec/bitstream.c:            vlc->table =
> av_realloc_static(vlc->table,
> ./libavcodec/utils.c:void *av_realloc_static(void *ptr, unsigned int size)
> ./libavcodec/avcodec.h:void *av_realloc_static(void *ptr, unsigned int
> size);
> 
> Where you talking about that file only or some others too?

i dont know, i never liked av_*alloc_static it is IMO a dirty hack


> 
> Where should av_realloc_static() be moved to? As it is only used in
> bitstream.c, into that file with the declaration removed from avcodec.h?

id leave av_realloc_static() in utils.c for now and move the declaration
to bitstream.c though that isnt ideal, but at least it must be removed from
avcodec.h

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070222/36c8156e/attachment.pgp>



More information about the ffmpeg-devel mailing list