diff options
author | wm4 <wm4@nowhere> | 2015-02-06 18:02:37 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-02-06 18:02:37 +0100 |
commit | e14d09c8a6aaf3a2a56898c46ec6ac817c0dd66f (patch) | |
tree | e2883d956ebaa7ef9de794d3cdb3101cd87c1b19 /stream/stream_lavf.c | |
parent | f3ae845fd294c0f8c08473e4a1245d643b4477ff (diff) | |
download | mpv-e14d09c8a6aaf3a2a56898c46ec6ac817c0dd66f.tar.bz2 mpv-e14d09c8a6aaf3a2a56898c46ec6ac817c0dd66f.tar.xz |
stream_lavf: fix build with Libav
The API function used is FFmpeg-only.
Sigh...
Diffstat (limited to 'stream/stream_lavf.c')
-rw-r--r-- | stream/stream_lavf.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/stream/stream_lavf.c b/stream/stream_lavf.c index a121cd5af4..079bb4e550 100644 --- a/stream/stream_lavf.c +++ b/stream/stream_lavf.c @@ -182,8 +182,11 @@ void mp_setup_av_network_options(AVDictionary **dict, struct mpv_global *global, 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); + if (opts->network_timeout > 0) { + char buf[80]; + snprintf(buf, sizeof(buf), "%lld", (long long)(opts->network_timeout * 1e6)); + av_dict_set(dict, "timeout", buf, 0); + } mp_set_avdict(dict, opts->stream_lavf_opts->avopts); |