mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-03 08:57:32 +08:00
修改Rtmp播放结果回调事件触发机制,防止秒开失败以及获取Track失败
This commit is contained in:
@@ -58,7 +58,6 @@ public:
|
||||
seekToMilliSecond(fProgress * getDuration() * 1000);
|
||||
};
|
||||
void play(const string &strUrl) override {
|
||||
_analysisMs = (*this)[kMaxAnalysisMS].as<int>();
|
||||
PlayerImp<RtmpPlayer,RtmpDemuxer>::play(strUrl);
|
||||
}
|
||||
private:
|
||||
@@ -76,16 +75,13 @@ private:
|
||||
_pRtmpMediaSrc->onWrite(chunkData);
|
||||
}
|
||||
if(!_parser){
|
||||
//这个流没有metedata,那么尝试在音视频包里面还原出相关信息
|
||||
//这个流没有metedata
|
||||
_parser.reset(new RtmpDemuxer());
|
||||
onPlayResult_l(SockException(Err_success,"play rtmp success"));
|
||||
}
|
||||
_parser->inputRtmp(chunkData);
|
||||
checkInited(_analysisMs);
|
||||
}
|
||||
private:
|
||||
RtmpMediaSource::Ptr _pRtmpMediaSrc;
|
||||
int _analysisMs;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user