[FFmpeg-trac] #8893(avformat:new): multiple calls to srt_startup/srt_cleanup within a process

FFmpeg trac at avcodec.org
Wed Sep 16 10:22:08 EEST 2020


#8893: multiple calls to srt_startup/srt_cleanup within a process
-------------------------------------+------------------------------------
             Reporter:  malcolmb     |                    Owner:
                 Type:  enhancement  |                   Status:  new
             Priority:  normal       |                Component:  avformat
              Version:  git-master   |               Resolution:
             Keywords:  srt          |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+------------------------------------

Comment (by cus):

 IMHO SRT should be fixed instead to support srt_startup() srt_cleanup()
 cycles properly. What is the purpose of reference counting if
 srt_cleanup() can only be called at the very end of an application? It
 does not make a lot of sense.

 Clearly it is not OK to call srt_startup() in any of the global init
 functions (which are by the way depreacated), because nobody wants the srt
 library to spawn a thread when it is not even known that if srt will be
 used at all.

 Meanwhile you can call srt_startup() yourself from your application before
 doing any work. This will keep the reference counter above 0, so global
 state should never be destroyed.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/8893#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list