]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtpproto.c
doxygen: place empty line between brief description and detailed description
[ffmpeg] / libavformat / rtpproto.c
index 0439bc07fc08dfaf88115d473b85dc18f918b623..dba1d35b03c8fd2c7a540f7b61730c511e057a4d 100644 (file)
@@ -86,7 +86,7 @@ int rtp_set_remote_url(URLContext *h, const char *uri)
  * "http://host:port/path?option1=val1&option2=val2...
  */
 
-static void url_add_option(char *buf, int buf_size, const char *fmt, ...)
+static av_printf_format(3, 4) void url_add_option(char *buf, int buf_size, const char *fmt, ...)
 {
     char buf1[1024];
     va_list ap;
@@ -138,15 +138,13 @@ static int rtp_open(URLContext *h, const char *uri, int flags)
 {
     RTPContext *s;
     int rtp_port, rtcp_port,
-        is_output, ttl, connect,
+        ttl, connect,
         local_rtp_port, local_rtcp_port, max_packet_size;
     char hostname[256];
     char buf[1024];
     char path[1024];
     const char *p;
 
-    is_output = (flags & URL_WRONLY);
-
     s = av_mallocz(sizeof(RTPContext));
     if (!s)
         return AVERROR(ENOMEM);
@@ -206,7 +204,7 @@ static int rtp_open(URLContext *h, const char *uri, int flags)
     s->rtp_fd = ffurl_get_file_handle(s->rtp_hd);
     s->rtcp_fd = ffurl_get_file_handle(s->rtcp_hd);
 
-    h->max_packet_size = url_get_max_packet_size(s->rtp_hd);
+    h->max_packet_size = s->rtp_hd->max_packet_size;
     h->is_streamed = 1;
     return 0;
 
@@ -355,11 +353,10 @@ int rtp_get_rtcp_file_handle(URLContext *h) {
 }
 
 URLProtocol ff_rtp_protocol = {
-    "rtp",
-    rtp_open,
-    rtp_read,
-    rtp_write,
-    NULL, /* seek */
-    rtp_close,
+    .name                = "rtp",
+    .url_open            = rtp_open,
+    .url_read            = rtp_read,
+    .url_write           = rtp_write,
+    .url_close           = rtp_close,
     .url_get_file_handle = rtp_get_file_handle,
 };