diff options
author | wm4 <wm4@nowhere> | 2015-02-06 17:01:35 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-02-06 17:01:35 +0100 |
commit | f3ae845fd294c0f8c08473e4a1245d643b4477ff (patch) | |
tree | 782c775e98a7d7df0bf6acfb3158c733c1a70382 /stream | |
parent | ffe894ec0a73ab6a16ce1ca62800bf1612542107 (diff) | |
download | mpv-f3ae845fd294c0f8c08473e4a1245d643b4477ff.tar.bz2 mpv-f3ae845fd294c0f8c08473e4a1245d643b4477ff.tar.xz |
options: add --network-timeout
Not quite sure if this actually works as intended.
Fixes #1566.
Diffstat (limited to 'stream')
-rw-r--r-- | stream/stream_lavf.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/stream/stream_lavf.c b/stream/stream_lavf.c index fd83202632..a121cd5af4 100644 --- a/stream/stream_lavf.c +++ b/stream/stream_lavf.c @@ -181,6 +181,9 @@ void mp_setup_av_network_options(AVDictionary **dict, struct mpv_global *global, if (strlen(cust_headers)) av_dict_set(dict, "headers", cust_headers, 0); av_dict_set(dict, "icy", "1", 0); + // So far, every known protocol uses microseconds for this + if (opts->network_timeout > 0) + av_dict_set_int(dict, "timeout", opts->network_timeout * 1e6, 0); mp_set_avdict(dict, opts->stream_lavf_opts->avopts); |