diff mbox series

[FFmpeg-devel,6/7] avformat/librist: clarify and limit buffer_size

Message ID 20210306232619.5963-6-cus@passwd.hu
State Accepted
Commit 5bd1d0f4e7150b76f1a3922aefea507aa8a2dd06
Headers show
Series [FFmpeg-devel,1/7] libavformat: add librist protocol | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Marton Balint March 6, 2021, 11:26 p.m. UTC
As suggested by librist developers.

Signed-off-by: Marton Balint <cus@passwd.hu>
---
 doc/protocols.texi    | 4 +++-
 libavformat/librist.c | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/doc/protocols.texi b/doc/protocols.texi
index 45ef946efd..d6ecbd5bac 100644
--- a/doc/protocols.texi
+++ b/doc/protocols.texi
@@ -706,7 +706,9 @@  This one is default.
 @end table
 
 @item buffer_size
-Set internal RIST buffer size for retransmission of data.
+Set internal RIST buffer size in milliseconds for retransmission of data.
+Default value is 0 which means the librist default (1 sec). Maximum value is 30
+seconds.
 
 @item pkt_size
 Set maximum packet size for sending data. 1316 by default.
diff --git a/libavformat/librist.c b/libavformat/librist.c
index 2296bfa079..01a3f9c122 100644
--- a/libavformat/librist.c
+++ b/libavformat/librist.c
@@ -62,7 +62,7 @@  static const AVOption librist_options[] = {
     { "simple",      NULL,              0,                   AV_OPT_TYPE_CONST, {.i64=RIST_PROFILE_SIMPLE},   0, 0, .flags = D|E, "profile" },
     { "main",        NULL,              0,                   AV_OPT_TYPE_CONST, {.i64=RIST_PROFILE_MAIN},     0, 0, .flags = D|E, "profile" },
     { "advanced",    NULL,              0,                   AV_OPT_TYPE_CONST, {.i64=RIST_PROFILE_ADVANCED}, 0, 0, .flags = D|E, "profile" },
-    { "buffer_size", "set buffer_size", OFFSET(buffer_size), AV_OPT_TYPE_INT,   {.i64=0},                     0, INT_MAX, .flags = D|E },
+    { "buffer_size", "set buffer_size in ms", OFFSET(buffer_size), AV_OPT_TYPE_INT, {.i64=0},                 0, 30000, .flags = D|E },
     { "pkt_size",    "set packet size", OFFSET(packet_size), AV_OPT_TYPE_INT,   {.i64=1316},                  1, MAX_PAYLOAD_SIZE,    .flags = D|E },
     { "log_level",   "set loglevel",    OFFSET(log_level),   AV_OPT_TYPE_INT,   {.i64=RIST_LOG_INFO},        -1, INT_MAX, .flags = D|E },
     { "secret", "set encryption secret",OFFSET(secret),      AV_OPT_TYPE_STRING,{.str=NULL},                  0, 0,       .flags = D|E },