Discussion:
[MPlayer-users] Using network protocols without global network initialization. Please use avformat_network_init()
Rasz
2015-05-31 21:00:46 UTC
Permalink
I know it comes from libavformat/network.c, but what does that mean?
--
Who logs in to gdm? Not I, said the duck.
andrew
2015-06-01 08:34:04 UTC
Permalink
Post by Rasz
I know it comes from libavformat/network.c, but what does that mean?
I am also keen to know as this often spams my terminal :)

Andrew
--
You think that's air you're breathing now?
Reimar Döffinger
2015-06-03 17:09:52 UTC
Permalink
Post by andrew
Post by Rasz
I 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.
wm4
2015-06-03 17:28:10 UTC
Permalink
On Wed, 3 Jun 2015 19:09:52 +0200
Post by Reimar Döffinger
Post by andrew
Post by Rasz
I 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).
Reimar Döffinger
2015-06-04 18:38:06 UTC
Permalink
Post by wm4
On Wed, 3 Jun 2015 19:09:52 +0200
Post by Reimar Döffinger
Post by andrew
Post by Rasz
I 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.
Either way around, I can't figure out any explanation
that ends with anything other than this API and message
being idiotic.
wm4
2015-06-04 19:29:11 UTC
Permalink
On Thu, 4 Jun 2015 20:38:06 +0200
Post by Reimar Döffinger
Post by wm4
On Wed, 3 Jun 2015 19:09:52 +0200
Post by Reimar Döffinger
Post by andrew
Post by Rasz
I 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öffinger
Either 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.

Loading...