[vlc-devel] [PATCH] DXVA2: lock the buffer pool when getting/releasing a buffer (v4)

Steve Lhomme robux4 at videolabs.io
Wed Apr 22 16:15:49 CEST 2015


You can look at vaapi.c which uses similar "asymmetrical" calls. The
only difference is that he lock is always there, even if only 1 thread
will be used.

On Wed, Apr 22, 2015 at 4:13 PM, Steve Lhomme <robux4 at videolabs.io> wrote:
> On Wed, Apr 22, 2015 at 3:54 PM, Rémi Denis-Courmont <remi at remlab.net> wrote:
>> Le 2015-04-22 16:50, Steve Lhomme a écrit :
>>>
>>> There's a lock/unlock() in Release(). What other piece of code are you
>>> referring to ?
>>
>>
>> The answer is in the first mail. You are really tiring at making people
>> repeat the same thing again and again all the time.
>
>
> That's because I don't understand the issue you are pointing out. Are
> you confused by the test of surface->p_lock in Release, whereas in Get
> it's using sys->b_thread_safe ? I could use the same code. But one
> cannot be set without the other. They are all using the same lock.
>
> In Get you cannot use the lock from surface, since you're looking for
> surface. In Release you cannot use the lock from sys because you don't
> have access to it.



More information about the vlc-devel mailing list