mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-10-31 00:37:39 +08:00
修复metadata中没duration导致播放失败的bug:#362
This commit is contained in:
parent
c49812fe73
commit
66c5a7169a
@ -257,8 +257,8 @@ void RtmpSession::sendPlayResponse(const string &err,const RtmpMediaSource::Ptr
|
||||
invoke.clear();
|
||||
invoke << "onMetaData" << metadata;
|
||||
sendResponse(MSG_DATA, invoke.data());
|
||||
auto duration = metadata["duration"].as_number();
|
||||
if(duration > 0){
|
||||
auto duration = metadata["duration"];
|
||||
if(duration && duration.as_number() > 0){
|
||||
//这是点播,使用绝对时间戳
|
||||
_stamp[0].setPlayBack();
|
||||
_stamp[1].setPlayBack();
|
||||
|
Loading…
Reference in New Issue
Block a user