[FFmpeg-devel] [PATCH 6/7] avformat/librist: clarify and limit buffer_size
Marton Balint
cus at passwd.hu
Sun Mar 7 01:26:18 EET 2021
As suggested by librist developers.
Signed-off-by: Marton Balint <cus at passwd.hu>
---
doc/protocols.texi | 4 +++-
libavformat/librist.c | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
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 },
--
2.26.2
More information about the ffmpeg-devel
mailing list