修复RtpProcess析构导致的线程问题

This commit is contained in:
ziyue
2022-11-01 16:05:23 +08:00
parent f5a032c9a0
commit bfe118d94e
3 changed files with 17 additions and 2 deletions

View File

@@ -49,10 +49,13 @@ RtpProcess::RtpProcess(const string &stream_id) {
}
}
RtpProcess::~RtpProcess() {
void RtpProcess::flush() {
if (_process) {
_process->flush();
}
}
RtpProcess::~RtpProcess() {
uint64_t duration = (_last_frame_time.createdTime() - _last_frame_time.elapsedTime()) / 1000;
WarnP(this) << "RTP推流器("
<< _media_info.shortUrl()