diff avformat.h @ 2317:2adc9f64ecfb libavformat

Change avf_sdp_create() to get a pre-allocated buffer as input, and to return an integer (0 if the SDP has been succesfully created, < 0 in case of error)
author lucabe
date Sun, 05 Aug 2007 13:44:56 +0000
parents 9c8cfadff191
children 43a4290a6d77
line wrap: on
line diff
--- a/avformat.h	Sun Aug 05 13:32:37 2007 +0000
+++ b/avformat.h	Sun Aug 05 13:44:56 2007 +0000
@@ -842,12 +842,13 @@
  *           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 pointer 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.
+ * @param n_files number of AVCodecContexts contained in ac
+ * @param buff buffer where the SDP will be stored (must be allocated by
+ *             the caller
+ * @param size the size of the buffer
+ * @return 0 if OK. AVERROR_xxx if error.
  */
-char *avf_sdp_create(AVFormatContext *ac[], int n_streams);
+int avf_sdp_create(AVFormatContext *ac[], int n_files, char *buff, int size);
 
 #ifdef HAVE_AV_CONFIG_H