Call avformat_network_init/deinit in the programs

Calling the init function will become mandatory at some later
point. By calling it, more heavy network init (such as SSL/TLS
library init) can be done once at startup, instead of implicitly
when used (which could lead to it being done a number of times).

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Martin Storsjö
2011-11-06 18:31:39 +02:00
parent 3607ed70d5
commit 776f2bb91a
5 changed files with 10 additions and 0 deletions
+3
View File
@@ -399,6 +399,7 @@ int main(int argc, char **argv)
parse_loglevel(argc, argv, options);
av_register_all();
avformat_network_init();
init_opts();
#if CONFIG_AVDEVICE
avdevice_register_all();
@@ -416,5 +417,7 @@ int main(int argc, char **argv)
ret = probe_file(input_filename);
avformat_network_deinit();
return ret;
}