Merge commit 'ccea588f831906084b8c8235222920e6984beb72'
* commit 'ccea588f831906084b8c8235222920e6984beb72': avio: Add an option 'rw_timeout' Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
commit
299d4f9428
@ -36,6 +36,14 @@ particular protocol using the option
|
|||||||
The option "-protocols" of the ff* tools will display the list of
|
The option "-protocols" of the ff* tools will display the list of
|
||||||
supported protocols.
|
supported protocols.
|
||||||
|
|
||||||
|
All protocols accept the following options:
|
||||||
|
|
||||||
|
@table @option
|
||||||
|
@item rw_timeout
|
||||||
|
Maximum time to wait for (network) read/write operations to complete,
|
||||||
|
in microseconds.
|
||||||
|
@end table
|
||||||
|
|
||||||
A description of the currently available protocols follows.
|
A description of the currently available protocols follows.
|
||||||
|
|
||||||
@section async
|
@section async
|
||||||
|
@ -56,6 +56,7 @@ static void *urlcontext_child_next(void *obj, void *prev)
|
|||||||
static const AVOption options[] = {
|
static const AVOption options[] = {
|
||||||
{"protocol_whitelist", "List of protocols that are allowed to be used", OFFSET(protocol_whitelist), AV_OPT_TYPE_STRING, { .str = NULL }, CHAR_MIN, CHAR_MAX, D },
|
{"protocol_whitelist", "List of protocols that are allowed to be used", OFFSET(protocol_whitelist), AV_OPT_TYPE_STRING, { .str = NULL }, CHAR_MIN, CHAR_MAX, D },
|
||||||
{"protocol_blacklist", "List of protocols that are not allowed to be used", OFFSET(protocol_blacklist), AV_OPT_TYPE_STRING, { .str = NULL }, CHAR_MIN, CHAR_MAX, D },
|
{"protocol_blacklist", "List of protocols that are not allowed to be used", OFFSET(protocol_blacklist), AV_OPT_TYPE_STRING, { .str = NULL }, CHAR_MIN, CHAR_MAX, D },
|
||||||
|
{"rw_timeout", "Timeout for IO operations (in microseconds)", offsetof(URLContext, rw_timeout), AV_OPT_TYPE_INT64, { .i64 = 0 }, 0, INT64_MAX, AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_DECODING_PARAM },
|
||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -388,8 +389,10 @@ static inline int retry_transfer_wrapper(URLContext *h, uint8_t *buf,
|
|||||||
}
|
}
|
||||||
} else if (ret < 1)
|
} else if (ret < 1)
|
||||||
return (ret < 0 && ret != AVERROR_EOF) ? ret : len;
|
return (ret < 0 && ret != AVERROR_EOF) ? ret : len;
|
||||||
if (ret)
|
if (ret) {
|
||||||
fast_retries = FFMAX(fast_retries, 2);
|
fast_retries = FFMAX(fast_retries, 2);
|
||||||
|
wait_since = 0;
|
||||||
|
}
|
||||||
len += ret;
|
len += ret;
|
||||||
}
|
}
|
||||||
return len;
|
return len;
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#define LIBAVFORMAT_VERSION_MAJOR 57
|
#define LIBAVFORMAT_VERSION_MAJOR 57
|
||||||
#define LIBAVFORMAT_VERSION_MINOR 34
|
#define LIBAVFORMAT_VERSION_MINOR 34
|
||||||
#define LIBAVFORMAT_VERSION_MICRO 101
|
#define LIBAVFORMAT_VERSION_MICRO 102
|
||||||
|
|
||||||
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
|
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
|
||||||
LIBAVFORMAT_VERSION_MINOR, \
|
LIBAVFORMAT_VERSION_MINOR, \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user