History

avformat: make avformat_network_init() explicitly optional

It was sort of optional before - if you didn't call it, networking was initialized on demand, and an ugly warning was logged. Also, the doxygen comments threatened that it would be made strictly required one day. Make it explicitly optional. I would prefer to deprecate it fully, but there might still be legitimate reasons to use this. But the average user won't need it. This is needed only for two reasons: to initialize TLS libraries like OpenSSL and GnuTLS, and winsock. OpenSSL and GnuTLS were already silently initialized on demand if the global network init function was not called. They also have various thread-safety acrobatics, which make concurrent initialization within libavformat safe. In addition, the libraries are moving towards making their global init functions safe, which removes all need for central global init. In particular, GnuTLS 3.5.16 and OpenSSL 1.1.0g have been found to have safe init functions. In all cases, they use internal reference counters to avoid that the global uninit functions interfere with concurrent uses of the library by other API users who called global init. winsock should be thread-safe as well, and maintains an internal reference counter as well. Since we still support ancient TLS libraries, which do not have this fixed, and since it's unknown whether winsock and GnuTLS reinitialization is costly in any way, don't deprecate the libavformat functions yet.

wm4 committed 8 years ago

Commit 631c56a1 parent 6512ff76 files · +20 −19Browse files

Showing the changes to doc/APIchanges (1 of 6 files). Show all

Unified · Split

doc/APIchanges+6−0
@@ -15,6 +15,12 @@ libavutil: 2017-10-21 · 14 unmodified lines
1515
1616 API changes, most recent first:
1717
18+2018-01-xx - xxxxxxx - lavf 58.5.100 - avformat.h
19+ Explicitly make avformat_network_init() and avformat_network_deinit() optional.
20+ If these are not called, network initialization and deinitialization is
21+ automatic, and unlike in older versions, fully supported, unless libavformat
22+ is linked to ancient GnuTLS and OpenSSL.
23+
1824 2018-01-xx - xxxxxxx - lavf 58.4.100 - avformat.h
1925 Deprecate AVStream.recommended_encoder_configuration. It was useful only for
2026 FFserver, which has been removed.

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