API changes, most recent first:
+2018-01-xx - xxxxxxx - lavf 58.5.100 - avformat.h
+ Explicitly make avformat_network_init() and avformat_network_deinit() optional.
+ If these are not called, network initialization and deinitialization is
+ automatic, and unlike in older versions, fully supported, unless libavformat
+ is linked to ancient GnuTLS and OpenSSL.
+
2018-01-xx - xxxxxxx - lavf 58.4.100 - avformat.h
Deprecate AVStream.recommended_encoder_configuration. It was useful only for
FFserver, which has been removed.
void av_register_output_format(AVOutputFormat *format);
/**
- * Do global initialization of network components. This is optional,
- * but recommended, since it avoids the overhead of implicitly
- * doing the setup for each session.
+ * Do global initialization of network libraries. This is optional,
+ * and not recommended anymore.
*
- * Calling this function will become mandatory if using network
- * protocols at some major version bump.
+ * This functions only exists to work around thread-safety issues
+ * with older GnuTLS or OpenSSL libraries. If libavformat is linked
+ * to newer versions of those libraries, or if you do not use them,
+ * calling this function is unnecessary. Otherwise, you need to call
+ * this function before any other threads using them are started.
+ *
+ * This function will be deprecated once support for older GnuTLS and
+ * OpenSSL libraries is removed, and this function has no purpose
+ * anymore.
*/
int avformat_network_init(void);
/**
- * Undo the initialization done by avformat_network_init.
+ * Undo the initialization done by avformat_network_init. Call it only
+ * once for each time you called avformat_network_init.
*/
int avformat_network_deinit(void);
#endif
}
-int ff_network_inited_globally;
-
int ff_network_init(void)
{
#if HAVE_WINSOCK2_H
WSADATA wsaData;
-#endif
- if (!ff_network_inited_globally)
- av_log(NULL, AV_LOG_WARNING, "Using network protocols without global "
- "network initialization. Please use "
- "avformat_network_init(), this will "
- "become mandatory later.\n");
-#if HAVE_WINSOCK2_H
if (WSAStartup(MAKEWORD(1,1), &wsaData))
return 0;
#endif
int ff_socket_nonblock(int socket, int enable);
-extern int ff_network_inited_globally;
int ff_network_init(void);
void ff_network_close(void);
{
#if CONFIG_NETWORK
int ret;
- ff_network_inited_globally = 1;
if ((ret = ff_network_init()) < 0)
return ret;
if ((ret = ff_tls_init()) < 0)
#if CONFIG_NETWORK
ff_network_close();
ff_tls_deinit();
- ff_network_inited_globally = 0;
#endif
return 0;
}
// Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
// Also please add any ticket numbers that you believe might be affected here
#define LIBAVFORMAT_VERSION_MAJOR 58
-#define LIBAVFORMAT_VERSION_MINOR 4
+#define LIBAVFORMAT_VERSION_MINOR 5
#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \