[vlc-devel] Using logger during asynchronous close
remi at remlab.net
Wed Mar 10 14:32:36 UTC 2021
Le lundi 8 mars 2021, 19:23:11 EET Alexandre Janniaux a écrit :
> > Either you fix the design not to perform in(s)ane things, or you devise a
> > weak reference mechanism. The later means that log messages will sometime
> > get lost, which is far from good.
> Just so this is clear, what is the «insane/inane» thing?
Expecting the decoder object and/or its logger to outlive the life cycle
defined by owner of decoder.
> However asynchronously closing the resources
> allocated from the decoder should/has become quite common in the code base,
No? There are two types of resources that the decoder can create and might
outlive it: decoded data (audio blocks, pictures and SPUs), and ES formats.
They are all buffers and/or data. They are not processing elements. They don't
need a log attached to them.
And in any case, what's not possible is not possible.
More information about the vlc-devel