summaryrefslogtreecommitdiffstats
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
authorTristan Matthews <tmatth@videolan.org>2019-04-11 00:07:15 -0400
committerMartin Storsjö <martin@martin.st>2019-04-15 22:44:19 +0300
commit1e56173515826aa4d680d3b216d80a3879ed1c68 (patch)
tree9d4386ed5c0dd57fbbbcc2c1fc0fb0a5ab6a6907 /libavformat/rtsp.c
parent0676de935b1e81bc5b5698fef3e7d48ff2ea77ff (diff)
downloadffmpeg-streaming-1e56173515826aa4d680d3b216d80a3879ed1c68.zip
ffmpeg-streaming-1e56173515826aa4d680d3b216d80a3879ed1c68.tar.gz
rtsp: add pkt_size option
This allows users to specify an upper limit on the size of outgoing packets when publishing via RTSP. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r--libavformat/rtsp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 8bf9d9e..12c4998 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -74,7 +74,8 @@
#define COMMON_OPTS() \
{ "reorder_queue_size", "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[] = {
@@ -118,6 +119,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;
}
OpenPOWER on IntegriCloud