0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02:00

stream_lavf: fix build with Libav

The API function used is FFmpeg-only.

Sigh...
This commit is contained in:
wm4 2015-02-06 18:02:37 +01:00
parent f3ae845fd2
commit e14d09c8a6

View File

@ -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);