FFMS / ffms2

An FFmpeg based source library and Avisynth/VapourSynth plugin for easy frame accurate access
Other
576 stars 104 forks source link

API: Add FFMS_Deinit #300

Closed dwbuiten closed 6 years ago

dwbuiten commented 6 years ago

Because libavformat is great, and TLS libraries are great, and network stacks are great, libavformat has some global state init functions that do not need to be inited, and must only be run once, and also some other global state init functions that must be deinited upon program exit, and reinited if used again.

To this end, I've implemented this with a lock, so it can be re-inited after deinit safely, if the user wants to do that for some reason.

NOTE: I have not updated the AviSynth plugin to use this, since I can't figure out where the hell to put the FFMS_Deinit() call, because lolexceptionsforflowcontrol.