[FFmpeg-cvslog] lavf: rename a parameter of av_sdp_create from buff->buf

Anton Khirnov git at videolan.org
Sat Apr 9 03:24:59 CEST 2011


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Fri Apr  8 12:22:39 2011 +0200| [c234d40bd9c98fc8c5540135cd5055c12e603a0f] | committer: Anton Khirnov

lavf: rename a parameter of av_sdp_create from buff->buf

This is more consistent with the rest of the API.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c234d40bd9c98fc8c5540135cd5055c12e603a0f
---

 libavformat/avformat.h |    6 +++---
 libavformat/sdp.c      |   12 ++++++------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 26fca88..8e18a61 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1553,12 +1553,12 @@ int av_filename_number_test(const char *filename);
  *           all the contexts in the array (an AVCodecContext per RTP stream)
  *           must contain only one AVStream.
  * @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 buf 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 on error
  */
-int av_sdp_create(AVFormatContext *ac[], int n_files, char *buff, int size);
+int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size);
 
 #if FF_API_SDP_CREATE
 attribute_deprecated int avf_sdp_create(AVFormatContext *ac[], int n_files, char *buff, int size);
diff --git a/libavformat/sdp.c b/libavformat/sdp.c
index 0e46c33..005434c 100644
--- a/libavformat/sdp.c
+++ b/libavformat/sdp.c
@@ -474,14 +474,14 @@ void ff_sdp_write_media(char *buff, int size, AVCodecContext *c, const char *des
     sdp_write_media_attributes(buff, size, c, payload_type);
 }
 
-int av_sdp_create(AVFormatContext *ac[], int n_files, char *buff, int size)
+int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size)
 {
     AVMetadataTag *title = av_metadata_get(ac[0]->metadata, "title", NULL, 0);
     struct sdp_session_level s;
     int i, j, port, ttl, is_multicast;
     char dst[32], dst_type[5];
 
-    memset(buff, 0, size);
+    memset(buf, 0, size);
     memset(&s, 0, sizeof(struct sdp_session_level));
     s.user = "-";
     s.src_addr = "127.0.0.1";    /* FIXME: Properly set this */
@@ -506,7 +506,7 @@ int av_sdp_create(AVFormatContext *ac[], int n_files, char *buff, int size)
             }
         }
     }
-    sdp_write_header(buff, size, &s);
+    sdp_write_header(buf, size, &s);
 
     dst[0] = 0;
     for (i = 0; i < n_files; i++) {
@@ -518,11 +518,11 @@ int av_sdp_create(AVFormatContext *ac[], int n_files, char *buff, int size)
                 ttl = 0;
         }
         for (j = 0; j < ac[i]->nb_streams; j++) {
-            ff_sdp_write_media(buff, size,
+            ff_sdp_write_media(buf, size,
                                   ac[i]->streams[j]->codec, dst[0] ? dst : NULL,
                                   dst_type, (port > 0) ? port + j * 2 : 0, ttl);
             if (port <= 0) {
-                av_strlcatf(buff, size,
+                av_strlcatf(buf, size,
                                    "a=control:streamid=%d\r\n", i + j);
             }
         }
@@ -531,7 +531,7 @@ int av_sdp_create(AVFormatContext *ac[], int n_files, char *buff, int size)
     return 0;
 }
 #else
-int av_sdp_create(AVFormatContext *ac[], int n_files, char *buff, int size)
+int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size)
 {
     return AVERROR(ENOSYS);
 }



More information about the ffmpeg-cvslog mailing list