[FFmpeg-devel] [PATCH 5/6] avformat/udp: clarify option description for timeout unit

Nicolas George george at nsup.org
Wed Oct 14 18:03:56 EEST 2020


lance.lmwang at gmail.com (12020-10-14):
> From: Limin Wang <lance.lmwang at gmail.com>
> 
> Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> ---
>  libavformat/udp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/udp.c b/libavformat/udp.c
> index 30d8041..ee5fa84 100644
> --- a/libavformat/udp.c
> +++ b/libavformat/udp.c
> @@ -138,7 +138,7 @@ static const AVOption options[] = {
>      { "connect",        "set if connect() should be called on socket",     OFFSET(is_connected),   AV_OPT_TYPE_BOOL,   { .i64 =  0 },     0, 1,       .flags = D|E },
>      { "fifo_size",      "set the UDP receiving circular buffer size, expressed as a number of packets with size of 188 bytes", OFFSET(circular_buffer_size), AV_OPT_TYPE_INT, {.i64 = 7*4096}, 0, INT_MAX, D },
>      { "overrun_nonfatal", "survive in case of UDP receiving circular buffer overrun", OFFSET(overrun_nonfatal), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1,    D },
> -    { "timeout",        "set raise error timeout (only in read mode)",     OFFSET(timeout),        AV_OPT_TYPE_INT,    { .i64 = 0 },      0, INT_MAX, D },

> +    { "timeout",        "set raise error timeout, in microseconds(only in read mode)",OFFSET(timeout),          AV_OPT_TYPE_INT,  {.i64 = 0}, 0, INT_MAX, D },

You broke spacing.

I think it would be better to deprecate all these integer options and
replace them by proper durations.

>      { "sources",        "Source list",                                     OFFSET(sources),        AV_OPT_TYPE_STRING, { .str = NULL },               .flags = D|E },
>      { "block",          "Block list",                                      OFFSET(block),          AV_OPT_TYPE_STRING, { .str = NULL },               .flags = D|E },
>      { NULL }

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20201014/d6d42871/attachment.sig>


More information about the ffmpeg-devel mailing list