提高对无Metadata的rtmp流的兼容性

This commit is contained in:
xiongziliang 2019-09-24 11:44:23 +08:00
parent 653667baf5
commit 8552687559

View File

@ -375,10 +375,10 @@ void RtmpPlayer::onRtmpChunk(RtmpPacket &chunkData) {
_aiNowStamp[idx] = chunkData.timeStamp; _aiNowStamp[idx] = chunkData.timeStamp;
} }
if(!_metadata_got){ if(!_metadata_got){
_metadata_got = true;
if(!onCheckMeta(TitleMeta().getMetadata())){ if(!onCheckMeta(TitleMeta().getMetadata())){
throw std::runtime_error("onCheckMeta failed"); throw std::runtime_error("onCheckMeta failed");
} }
_metadata_got = true;
} }
onMediaData_l(std::make_shared<RtmpPacket>(std::move(chunkData))); onMediaData_l(std::make_shared<RtmpPacket>(std::move(chunkData)));
} }