summaryrefslogtreecommitdiff
path: root/libavformat/tcp.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-10 23:35:41 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-10-11 00:39:01 +0200
commitae17a0c25873bd39c048c176dca2372f565276d9 (patch)
treec37cf84af10547282f03dc6ed495622903e15226 /libavformat/tcp.c
parent937aac4f978c79ebdb2ae940b64a0f5cdb534d68 (diff)
parent1d4579e38ecad578c86516fad2837a273d11b320 (diff)
Merge commit '1d4579e38ecad578c86516fad2837a273d11b320'
* commit '1d4579e38ecad578c86516fad2837a273d11b320': tcp: Add AVOption support Conflicts: libavformat/tcp.c See: 2e009c6042bde419599ebed9165e597bbef23b2f Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/tcp.c')
-rw-r--r--libavformat/tcp.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libavformat/tcp.c b/libavformat/tcp.c
index 3c3f4f53ab..a1b185635c 100644
--- a/libavformat/tcp.c
+++ b/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 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,
};