[FFmpeg-devel] default lock mechanism in libavcodec/utils.c
anshul
anshul.ffmpeg at gmail.com
Wed Jan 29 06:41:31 CET 2014
On 01/28/2014 08:31 PM, Michael Niedermayer wrote:
> if you had avcodec_unregister_all() you will have to deal with
> libgstreamer and libvlc calling it while your app is also
> calling it and maybe another lib calling register and yet another
> still using avcodec. all happening at the same time
>
> this can be solved in various ways, a lock and reference counting is
> one, another is to use some code that gets called on exit or
> lib unloading by the OS.
> I think none of these will be really easy to do portably
If I am planning to use some code that gets called when library is unloaded.
I do need static avcodec lock acess out of library, I have attached one
patch
so that user might be able to call this function in his destructor of
library
But your idea about reference count is very good, but I don't where to
keep that
reference count variable, only thing that strike my mind was to make
reference count variable global.
If you have any other way then making it global please ...
Thanks
Anshul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-added-ff_destroy_lock_avcodec-so-that-it-can-be-call.patch
Type: text/x-patch
Size: 1257 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140129/3b205879/attachment.bin>
More information about the ffmpeg-devel
mailing list