]> git.sesse.net Git - ffmpeg/commitdiff
Merge commit '1e56173515826aa4d680d3b216d80a3879ed1c68'
authorJames Almer <jamrial@gmail.com>
Thu, 2 May 2019 16:01:36 +0000 (13:01 -0300)
committerJames Almer <jamrial@gmail.com>
Thu, 2 May 2019 16:02:58 +0000 (13:02 -0300)
* commit '1e56173515826aa4d680d3b216d80a3879ed1c68':
  rtsp: add pkt_size option

Merged-by: James Almer <jamrial@gmail.com>
libavformat/rtsp.c
libavformat/rtsp.h

index 8349840c96ff536d7283edc55371958affdfb7d4..c153cac88b11523ed3043473131e6bace5e69ac9 100644 (file)
@@ -76,7 +76,8 @@
 
 #define COMMON_OPTS() \
     { "reorder_queue_size", "set number of packets to buffer for handling of reordered packets", OFFSET(reordering_queue_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, DEC }, \
-    { "buffer_size",        "Underlying protocol send/receive buffer size",                  OFFSET(buffer_size),           AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, DEC|ENC } \
+    { "buffer_size",        "Underlying protocol send/receive buffer size",                  OFFSET(buffer_size),           AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, DEC|ENC }, \
+    { "pkt_size",           "Underlying protocol send packet size",                          OFFSET(pkt_size),              AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, ENC } \
 
 
 const AVOption ff_rtsp_options[] = {
@@ -132,6 +133,8 @@ static AVDictionary *map_to_opts(RTSPState *rt)
 
     snprintf(buf, sizeof(buf), "%d", rt->buffer_size);
     av_dict_set(&opts, "buffer_size", buf, 0);
+    snprintf(buf, sizeof(buf), "%d", rt->pkt_size);
+    av_dict_set(&opts, "pkt_size", buf, 0);
 
     return opts;
 }
index b49278fc203398840f00a31afea9ecb057456e89..54a9a30c16f89441770341708e466c66c89fd538 100644 (file)
@@ -410,6 +410,7 @@ typedef struct RTSPState {
 
     char default_lang[4];
     int buffer_size;
+    int pkt_size;
 } RTSPState;
 
 #define RTSP_FLAG_FILTER_SRC  0x1    /**< Filter incoming UDP packets -