[vlc-devel] [PATCH 0/2] Add avio url output support (for rtmp)

Rémi Denis-Courmont remi at remlab.net
Tue Oct 4 16:23:17 CEST 2011

On Mon, 03 Oct 2011 15:32:52 -0400, Keary Griffin
<keary.griffin at unwiredappeal.com> wrote:
>> In fact, I guess TLS could still fail if input-slave
>> is in use; it looks to me like VLC runs all inputs in the same thread.
> I don't think this should be an issue since the avio module should be 
> calling PrepareAvioCall with the correct (currently active) vlc access 
> object before entering any libavio calls, thus setting the thread local 
> storage for that thread to the right value (and that same thread won't 
> have a chance to make another avio call until that call returns...)

I don't see at all how that solves the problem of two concurrent avio
inputs in the same thread.

You would have to reset the TLS at every Read|Seek|Control entry.

>> Also, what if any libavio back-end becomes multi-thread?
> This would indeed be an issue, but only if it makes the callback from a 
> different thread, which I would hope would be a big enough "change" that

> they would think twice before making a change like that(?)
> Another option is to just not use the callback at all (so there would be

> no way to cancel an avio call), but I'm not sure what the repercussions 
> would be.

I don't understand how it's supposed to work right now already. How does
avio know _when_ to check the callback? It can't be busy looping.

Rémi Denis-Courmont

More information about the vlc-devel mailing list