X-Git-Url: https://git.piment-noir.org/?p=deb_ffmpeg.git;a=blobdiff_plain;f=ffmpeg%2Flibavformat%2Ftcp.c;h=0aabc9db07b0d4d29999b5b2dc663e18afae584e;hp=3c3f4f53ab2baa347c590f526ebc485bf238f1e2;hb=f6fa7814ccfe3e76514b36cf04f5cd3cb657c8cf;hpb=2ba45a602cbfa7b771effba9b11bb4245c21bc00 diff --git a/ffmpeg/libavformat/tcp.c b/ffmpeg/libavformat/tcp.c index 3c3f4f5..0aabc9d 100644 --- a/ffmpeg/libavformat/tcp.c +++ b/ffmpeg/libavformat/tcp.c @@ -22,6 +22,7 @@ #include "libavutil/parseutils.h" #include "libavutil/opt.h" #include "libavutil/time.h" + #include "internal.h" #include "network.h" #include "os_support.h" @@ -43,13 +44,13 @@ typedef struct TCPContext { #define D AV_OPT_FLAG_DECODING_PARAM #define E AV_OPT_FLAG_ENCODING_PARAM static const AVOption options[] = { -{"listen", "listen on port instead of connecting", OFFSET(listen), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, D|E }, -{"timeout", "set timeout of socket I/O operations", OFFSET(rw_timeout), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, D|E }, -{"listen_timeout", "set connection awaiting timeout", OFFSET(listen_timeout), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, D|E }, -{NULL} + { "listen", "Listen for incoming connections", OFFSET(listen), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, .flags = D|E }, + { "timeout", "set timeout (in microseconds) of socket I/O operations", OFFSET(rw_timeout), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, .flags = D|E }, + { "listen_timeout", "Connection awaiting timeout", OFFSET(listen_timeout), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, .flags = D|E }, + { NULL } }; -static const AVClass tcp_context_class = { +static const AVClass tcp_class = { .class_name = "tcp", .item_name = av_default_item_name, .option = options, @@ -228,6 +229,6 @@ URLProtocol ff_tcp_protocol = { .url_get_file_handle = tcp_get_file_handle, .url_shutdown = tcp_shutdown, .priv_data_size = sizeof(TCPContext), - .priv_data_class = &tcp_context_class, .flags = URL_PROTOCOL_FLAG_NETWORK, + .priv_data_class = &tcp_class, };