multiple calls to srt_startup/srt_cleanup within a process
|Reported by:||malcolmb||Owned by:|
|Blocking:||Reproduced by developer:||no|
|Analyzed by developer:||no|
For software using libavformat directly, allocating and deallocating a context that's using libsrt will cause srt_startup() and srt_cleanup() to be called. Unless you always have SRT context in existence, this will cause the srt startup/cleanup to actually execute multiple times within one process. It's reference counted so if you have one context in existence all the time then it's fine, the work won't be done multiple times in a single process.
As mentioned by a SRT developer here:
This is not a recommended workflow (and it's untested).
It would be great if somehow (maybe via avformat_network_init(), avformat_network_deinit()), a calling app could avoid the actual extra startup/cleanups until the process is shutting down.