AI automatically translates all comments in the code into English (#3917)

This commit is contained in:
alex
2024-09-19 14:53:50 +08:00
committed by GitHub
parent 046de691cb
commit 4152dcd409
279 changed files with 10602 additions and 3038 deletions

View File

@@ -48,12 +48,14 @@ void TsPlayerImp::onPlayResult(const SockException &ex) {
void TsPlayerImp::onShutdown(const SockException &ex) {
while (_demuxer) {
try {
//shared_from_this()可能抛异常
// shared_from_this()可能抛异常 [AUTO-TRANSLATED:6af9bd3c]
// shared_from_this() may throw an exception
std::weak_ptr<TsPlayerImp> weak_self = static_pointer_cast<TsPlayerImp>(shared_from_this());
if (_decoder) {
_decoder->flush();
}
//等待所有frame flush输出后再触发onShutdown事件
// 等待所有frame flush输出后再触发onShutdown事件 [AUTO-TRANSLATED:93982eb3]
// Wait for all frame flush output before triggering the onShutdown event
static_pointer_cast<HlsDemuxer>(_demuxer)->pushTask([weak_self, ex]() {
if (auto strong_self = weak_self.lock()) {
strong_self->_demuxer = nullptr;