History

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).

Martin Storsjö committed 15 years ago

Commit 776f2bb1 parent 3607ed75 files · +10 −0Browse files

Unified · Split

5 files
  1. avconv.c +2 −0
  2. avplay.c +2 −0
  3. avprobe.c +3 −0
  4. avserver.c +1 −0
  5. ffmpeg.c +2 −0
avconv.c+2−0
@@ -542,6 +542,7 @@ void exit_program(int ret) · 541 unmodified lines
542542 #if CONFIG_AVFILTER
543543 avfilter_uninit();
544544 #endif
545+ avformat_network_deinit();
545546
546547 if (received_sigterm) {
547548 av_log(NULL, AV_LOG_INFO, "Received signal %d: terminating.\n",
@@ -4218,6 +4219,7 @@ int main(int argc, char **argv) · 3670 unmodified lines
42184219 avfilter_register_all();
42194220 #endif
42204221 av_register_all();
4222+ avformat_network_init();
42214223
42224224 avio_set_interrupt_cb(decode_interrupt_cb);
42234225
avplay.c+2−0
@@ -1259,6 +1259,7 @@ static void do_exit(void) · 1258 unmodified lines
12591259 #if CONFIG_AVFILTER
12601260 avfilter_uninit();
12611261 #endif
1262+ avformat_network_deinit();
12621263 if (show_status)
12631264 printf("\n");
12641265 SDL_Quit();
@@ -3066,6 +3067,7 @@ int main(int argc, char **argv) · 1801 unmodified lines
30663067 avfilter_register_all();
30673068 #endif
30683069 av_register_all();
3070+ avformat_network_init();
30693071
30703072 init_opts();
30713073
avprobe.c+3−0
@@ -399,6 +399,7 @@ int main(int argc, char **argv) · 398 unmodified lines
399399
400400 parse_loglevel(argc, argv, options);
401401 av_register_all();
402+ avformat_network_init();
402403 init_opts();
403404 #if CONFIG_AVDEVICE
404405 avdevice_register_all();
@@ -416,5 +417,7 @@ int main(int argc, char **argv) · 11 unmodified lines
416417
417418 ret = probe_file(input_filename);
418419
420+ avformat_network_deinit();
421+
419422 return ret;
420423 }
avserver.c+1−0
@@ -4670,6 +4670,7 @@ int main(int argc, char **argv) · 4669 unmodified lines
46704670
46714671 parse_loglevel(argc, argv, options);
46724672 av_register_all();
4673+ avformat_network_init();
46734674
46744675 show_banner();
46754676
ffmpeg.c+2−0
@@ -493,6 +493,7 @@ void exit_program(int ret) · 492 unmodified lines
493493 #if CONFIG_AVFILTER
494494 avfilter_uninit();
495495 #endif
496+ avformat_network_deinit();
496497
497498 if (received_sigterm) {
498499 fprintf(stderr,
@@ -4367,6 +4368,7 @@ int main(int argc, char **argv) · 3868 unmodified lines
43674368 avfilter_register_all();
43684369 #endif
43694370 av_register_all();
4371+ avformat_network_init();
43704372
43714373 avio_set_interrupt_cb(decode_interrupt_cb);
43724374

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t