[vlc-devel] [PATCH] avcodec: tell the vout not to peek in the decoder pool anymore when closing
Rémi Denis-Courmont
remi at remlab.net
Thu Dec 21 10:52:48 CET 2017
Le 20 décembre 2017 22:58:14 GMT+02:00, Steve Lhomme <robux4 at gmail.com> a écrit :
>No it's an issue with the whole design of the VA. The module is
>unconditionally unloaded from memory even though it might still have
>pictures with a context for destruction pointing to dead code. Luckily
>most
>of the time it doesn't bite because the vout is kept longer for reuse.
>It does bite when the driver has pending actions.
>On Wed 20 Dec 2017 at 19:13, Rémi Denis-Courmont <remi at remlab.net>
>wrote:
>
>> Le keskiviikkona 20. joulukuuta 2017, 18.49.58 EET Steve Lhomme a
>écrit :
>> > It's necessary to make sure the vout has no "active" decoder
>picture
>> > in use before killing the va. At least this is the case with DXVA2
>as
>> > there might be some pending copies in the driver that our code has
>no
>> > idea about. But we release the DLL before this is done, resulting
>in
>> > crashes. It doesn't happen with D3D11 because we mostly use 0-copy
>and
>> > so the vout owns the buffers.
>>
>> That sounds like a bug in your VA implementation.
>>
>> --
>> 雷米‧德尼-库尔蒙
>> https://www.remlab.net/
>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
Yes and that looks like a bug in the implementation of the VA plugin in question.
VDPAU VA does not unload the driver until all references are gone,regardless of the VA plugin being active or not.
Admittedly, there is a latent bug as VLC could unload a plugin after deactivation. But this is purely latent/theoretical as the current implementation of the modules bank only unloads plugins at LibVLC termination.
--
Remi Denis-Courmont
More information about the vlc-devel
mailing list