On Thu, 4 Jun 2015 20:38:06 +0200
Post by Reimar DöffingerPost by wm4On Wed, 3 Jun 2015 19:09:52 +0200
Post by Reimar DöffingerPost by andrewPost by RaszI know it comes from libavformat/network.c, but what does that mean?
I am also keen to know as this often spams my terminal :)
FFmpeg's libavformat wants you to call a special function when you want to
use any networking protocols.
However it is not generally possible to know if your use of libavformat
will end up using networking protocols or not.
So what libavformat "wants" isn't really possible to do in a sensible
way and thus I have so far just ignored these printouts.
However I guess we would make it happy in the cases where
it is easy (like https:// URLs) and thus reduce the number
of cases where this spam appears.
That's a funny thing to consider libavformat and libavcodec generally
need global init calls (the register functions).
I have not analyzed the cost of the network init code.
I assumed there is some significant cost, otherwise
those other init calls could just do the network init
and this separate function is useless and the printout
spam pointless.
No, no. This is because GnuTLS and OpenSSL were written by idiots. They
require global init for no good reason, and to make it even "nicer",
they:
1. have uninit calls too
2. uninit calls in other software or libraries might undo your own init
3. the calls aren't even thread-safe
So libavformat can't do anything about this. Other than implementing
its own TLS code, or running the TLS lib in a separate process, or
fixing the API upstream.
Post by Reimar DöffingerEither way around, I can't figure out any explanation
that ends with anything other than this API and message
being idiotic.
Personally I think it should just abort() instead of printing the
message. I take it that using OpenSSL and GnuTLS without the global
init calls is not valid.