mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-06-19 19:03:00 +02:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user