[FFmpeg-devel] Exporting avc_find_startcode?

Aurelien Jacobs aurel
Mon Jan 14 13:21:54 CET 2008


Luca Abeni wrote:

> Hi all,
> 
> Baptiste Coudurier wrote:
> >>>>>> Is it ok to export it (removing the "static"
> >>>>>> keyword, and putting the prototype in avc.h)?
> >>>>> IMO, yes.
> >>>>> Just make sure that your code is linked with avc.o.
> >>>> yes, but
> >>>> please dont call it anything starting with av... its not part of
> >>>> the public api
> >>> Ok; any suggestion for the name? What about
> >>> ff_avc_find_startcode()? I'm waiting for Baptiste's opinion, and
> >>> then I'll post a patch.
> >> Yes, ff_ is the usual prefix we use for internal functions with
> >> external linkage.
> >>
> > 
> > I have no objections.
> 
> Ok; here is the patch. Ok to commit?
> 
> [...]
> 
> Index: libavformat/avc.c
> ===================================================================
> --- libavformat/avc.c	(revision 11525)
> +++ libavformat/avc.c	(working copy)
> @@ -21,7 +21,7 @@
>  #include "avformat.h"
>  #include "avio.h"
>  
> -static uint8_t *avc_find_startcode( uint8_t *p, uint8_t *end )
> +uint8_t *ff_avc_find_startcode( uint8_t *p, uint8_t *end )

Spaces after '(' and before ')' are ugly. You could take this
opportunity to remove them.

> [...]
> 
> Index: libavformat/avc.h
> ===================================================================
> --- libavformat/avc.h	(revision 11525)
> +++ libavformat/avc.h	(working copy)
> @@ -27,5 +27,6 @@
>  
>  int ff_avc_parse_nal_units(uint8_t *buf_in, uint8_t **buf, int *size);
>  int ff_isom_write_avcc(ByteIOContext *pb, uint8_t *data, int len);
> +uint8_t *ff_avc_find_startcode( uint8_t *p, uint8_t *end );

At least, don't add new occurrence of those ugly spaces.

Except that cosmetic issue, patch looks OK.

Aurel




More information about the ffmpeg-devel mailing list