mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-21 01:13:37 +08:00
修复拉流代理获取流信息可能访问空指针的bug
此bug由 #2448 引入,触发条件: - 1.配置文件rtsp.directProxy设置为0 - 2.调用addStreamProxy代理rtsp流 在非直接代理情况下,PlayerProxy::_media_src为空,导致访问空指针。
This commit is contained in:
parent
f6ac39ade5
commit
0afe75229e
@ -65,8 +65,8 @@ void PlayerProxy::setOnConnect(std::function<void(const TranslationInfo&)> cb) {
|
||||
|
||||
void PlayerProxy::setTranslationInfo()
|
||||
{
|
||||
_transtalion_info.byte_speed = _media_src->getBytesSpeed();
|
||||
_transtalion_info.start_time_stamp = _media_src->getCreateStamp();
|
||||
_transtalion_info.byte_speed = _media_src ? _media_src->getBytesSpeed() : -1;
|
||||
_transtalion_info.start_time_stamp = _media_src ? _media_src->getCreateStamp() : 0;
|
||||
_transtalion_info.stream_info.clear();
|
||||
auto tracks = _muxer->getTracks();
|
||||
for (auto &track : tracks) {
|
||||
|
Loading…
Reference in New Issue
Block a user