[vlc-devel] [PATCH 2/3] vout: pause and resume the decoder pool

Rémi Denis-Courmont remi at remlab.net
Fri Nov 27 16:47:15 CET 2015

Le 2015-11-27 17:36, Thomas Guillem a écrit :
> On Fri, Nov 27, 2015, at 16:03, Rémi Denis-Courmont wrote:
>> Le 2015-11-26 21:03, Thomas Guillem a écrit :
>> > This fixes a deadlock when a decoder waits for a new picture while
>> > it's pausing
>> How is that a deadlock? Does it not unblock just fine when resuming?
> No, it deadlocks on flush/close since the decoder thread wait for an
> other thread that wait for a new picture, picture that will never 
> come
> since we are paused.

I am not sure this problem is even specific to pause, and not just pure 
timing chance.

In any case, that looks like a problem with flushing, not with pausing. 
There was previously a kludge (I think by "the other" Felix) to prevent 
picture allocation during flush.

I don't think anybody ever figured out what the real problem was 
though. As far as I can tell, there are no reasons why we should run out 
of picture buffers specifically during flush. I do not even know how to 
reproduce the lock-up.

>> > or flushing in a paused state.
>> It sounds like we have too few pictures in the pool if this happens.
>> Maybe flushing the video output *also* before the decoder fixes it??
> I tried to flush before instead of after, but it wasn't working. I
> didn't think about your solution. It seems to work fine and it's way
> simper than my solution. I'll propose a patch, thanks!

Rémi Denis-Courmont

More information about the vlc-devel mailing list