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>
| ... | ... |
@@ -542,6 +542,7 @@ void exit_program(int ret) |
| 542 | 542 |
#if CONFIG_AVFILTER |
| 543 | 543 |
avfilter_uninit(); |
| 544 | 544 |
#endif |
| 545 |
+ avformat_network_deinit(); |
|
| 545 | 546 |
|
| 546 | 547 |
if (received_sigterm) {
|
| 547 | 548 |
av_log(NULL, AV_LOG_INFO, "Received signal %d: terminating.\n", |
| ... | ... |
@@ -4218,6 +4219,7 @@ int main(int argc, char **argv) |
| 4218 | 4218 |
avfilter_register_all(); |
| 4219 | 4219 |
#endif |
| 4220 | 4220 |
av_register_all(); |
| 4221 |
+ avformat_network_init(); |
|
| 4221 | 4222 |
|
| 4222 | 4223 |
avio_set_interrupt_cb(decode_interrupt_cb); |
| 4223 | 4224 |
|
| ... | ... |
@@ -1259,6 +1259,7 @@ static void do_exit(void) |
| 1259 | 1259 |
#if CONFIG_AVFILTER |
| 1260 | 1260 |
avfilter_uninit(); |
| 1261 | 1261 |
#endif |
| 1262 |
+ avformat_network_deinit(); |
|
| 1262 | 1263 |
if (show_status) |
| 1263 | 1264 |
printf("\n");
|
| 1264 | 1265 |
SDL_Quit(); |
| ... | ... |
@@ -3066,6 +3067,7 @@ int main(int argc, char **argv) |
| 3066 | 3066 |
avfilter_register_all(); |
| 3067 | 3067 |
#endif |
| 3068 | 3068 |
av_register_all(); |
| 3069 |
+ avformat_network_init(); |
|
| 3069 | 3070 |
|
| 3070 | 3071 |
init_opts(); |
| 3071 | 3072 |
|
| ... | ... |
@@ -399,6 +399,7 @@ int main(int argc, char **argv) |
| 399 | 399 |
|
| 400 | 400 |
parse_loglevel(argc, argv, options); |
| 401 | 401 |
av_register_all(); |
| 402 |
+ avformat_network_init(); |
|
| 402 | 403 |
init_opts(); |
| 403 | 404 |
#if CONFIG_AVDEVICE |
| 404 | 405 |
avdevice_register_all(); |
| ... | ... |
@@ -416,5 +417,7 @@ int main(int argc, char **argv) |
| 416 | 416 |
|
| 417 | 417 |
ret = probe_file(input_filename); |
| 418 | 418 |
|
| 419 |
+ avformat_network_deinit(); |
|
| 420 |
+ |
|
| 419 | 421 |
return ret; |
| 420 | 422 |
} |
| ... | ... |
@@ -493,6 +493,7 @@ void exit_program(int ret) |
| 493 | 493 |
#if CONFIG_AVFILTER |
| 494 | 494 |
avfilter_uninit(); |
| 495 | 495 |
#endif |
| 496 |
+ avformat_network_deinit(); |
|
| 496 | 497 |
|
| 497 | 498 |
if (received_sigterm) {
|
| 498 | 499 |
fprintf(stderr, |
| ... | ... |
@@ -4367,6 +4368,7 @@ int main(int argc, char **argv) |
| 4367 | 4367 |
avfilter_register_all(); |
| 4368 | 4368 |
#endif |
| 4369 | 4369 |
av_register_all(); |
| 4370 |
+ avformat_network_init(); |
|
| 4370 | 4371 |
|
| 4371 | 4372 |
avio_set_interrupt_cb(decode_interrupt_cb); |
| 4372 | 4373 |
|