Closed fantasyARM closed 4 years ago
Previously, when cleaning up SrsSource, it is possible that a premature free occurred, but other coroutines continued to use that memory, causing the process to crash. (https://github.com/ossrs/srs/issues/713) Would using std::shared_ptr for these pointers solve the problem? When using this type of pointer, there is no need to free the memory manually. When there are no pointers pointing to that memory, the library will automatically free it. This can solve the issue of double free or premature free.
TRANS_BY_GPT3
SRS2 or SRS3?
Dup to #413
Workaround: https://github.com/ossrs/srs/issues/1579#issuecomment-736232139
srs_kernel_codec.cpp LINE:567 Passing acodec to the audio object internally, causing double free. Remove the free on line 420 of srs_kernel_codec.cpp. This object is passed in from the outside and its lifecycle is managed by the outside, so it should not be freed in the destructor of SrsFrame. [bug]
TRANS_BY_GPT3