[Ffmpeg-devel] Re: [PATCH] RTP/RTSP and MPEG4-AAC audio (Repost)

Michael Niedermayer michaelni
Sat May 14 21:33:01 CEST 2005


On Monday 09 May 2005 18:41, Romain DEGEZ wrote:
> Thanks Dave, Luca and Diego for your answers.
> Here is my patch without (I hope!) cosmetical changes :-)
> Please comment.


> +RTPPayloadType_t RTPPayloadTypes[]=

global variables need a prefix to avoid name clashes, RTP is certainly not 
libav* specific enough

> +static inline uint16_t decode_be16(const uint8_t *p) 
> +{   
> +    return (p[0] << 8) | p[1];
> +}  


the patch contains tabs


> +                /* Creating an attribute context if NULL */
> +                if (rtsp_st->rtp_extra_infos == NULL)
> +                    rtsp_st->rtp_extra_infos = 

the propose of comments is to provide information which isnt obvious from the 

the whole extra_infos system is unaceptable its significantly too complicated 
and messy
the string id from an attribute is looked up in the attr_names table converted 
to a integer send into rtp_set_int/str_attribute() which then practically 
converts the integer into the point in a codec specific structure (void 
*extra_infos) where the int or char* argument is stored (not surprisingly you 
forget to free a few things which got allocated on the way)
just store the values in a single codec independant structure


More information about the ffmpeg-devel mailing list