[FFmpeg-devel] [RFC] SDP Generation

Måns Rullgård mans
Wed Jul 25 10:45:27 CEST 2007


Luca Abeni <lucabe72 at email.it> writes:

> Hi,
>
> hopefully, I finally addressed all the comments. The SDP generator is
> now based on av_strlcatf(), and the overflow problems should be fixed
> (I did some tests, and coldn't manage to have it writing out of the
> allocated memory).
>
> Note: the check on extradata_size is based on a MAX_EXTRADATA_SIZE
> constant, that I set to (INT_MAX - 10) / 2 to avoid overflows. Since I
> do not know if such big extradata make sense or not, the constant can
> be decreased if needed.
>
> The doxygen comment for avf_sdp_create() will be in avformat.h (I'll
> send a patch in a short time), and will look like this:
> /**
>  * Generate an SDP for an RTP session.
>  *
>  * @param ac array of AVFormatContexts describing the RTP streams. If
>  *           the array is composed by only one context, such context
>  *           can contain multiple AVStreams (one AVStream per RTP
>  *           stream). Otherwise, all the contexts in the array (an
>  *           AVCodecContext per RTP stream) must contain only one
>  *           AVStream.
>  * @param n_streams number of AVCodecContexts contained in ac
>  * @return a pointed to the SDP (an array of chars which is allocated by
>  *         avf_sdp_create(), and must be freed by the caller), or NULL
>  *         in case of failure.
>  */
>
> Also, I am generating the patch for the build system, so I have a
> question for Diego or M?ns: can I build sdp.o unconditionally, or
> should I add a "--disable-sdp-generator" switch in configure?

A function declared in a public header file should normally be built
by default, unless it only serves as a helper for some optional
functionality, in which case it should be built whenever needed.  I
haven't followed this discussion closely, so I don't know what the
intended use of this function is.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list