统一部分变量名和代码样式风格

This commit is contained in:
custompal
2022-08-30 21:24:25 +08:00
parent 04aa3ef41f
commit 0d6509ce03
7 changed files with 156 additions and 164 deletions

View File

@@ -226,6 +226,8 @@ void SrtTransportImp::doPlay() {
assert(ts_src);
ts_src->pause(false);
strong_self->_ts_reader = ts_src->getRing()->attach(strong_self->getPoller());
weak_ptr<Session> weak_session = strong_self->getSession();
strong_self->_ts_reader->setGetInfoCB([weak_session]() { return weak_session.lock(); });
strong_self->_ts_reader->setDetachCB([weak_self]() {
auto strong_self = weak_self.lock();
if (!strong_self) {
@@ -234,8 +236,6 @@ void SrtTransportImp::doPlay() {
}
strong_self->onShutdown(SockException(Err_shutdown));
});
weak_ptr<Session> weak_session = strong_self->getSession();
strong_self->_ts_reader->setGetInfoCB([weak_session]() { return weak_session.lock(); });
strong_self->_ts_reader->setReadCB([weak_self](const TSMediaSource::RingDataType &ts_list) {
auto strong_self = weak_self.lock();
if (!strong_self) {