[FFmpeg-devel] [RFC] SDP Generation

Luca Abeni lucabe72
Wed Jul 25 09:51:40 CEST 2007


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?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sdp.c
Type: text/x-csrc
Size: 6999 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070725/0d651cc8/attachment.c>

More information about the ffmpeg-devel mailing list