提高对不规范GB28181流的兼容性,防止视频轨道被忽略

This commit is contained in:
xiongziliang 2022-05-20 21:52:53 +08:00
parent 557d70eac5
commit 30dbac2c70

View File

@ -139,7 +139,8 @@ void DecoderImp::onStream(int stream, int codecid, const void *extra, size_t byt
break; break;
} }
if (finish) { //防止未获取视频track提前complete导致忽略后续视频的问题用于兼容一些不太规范的ps流
if (finish && _tracks[TrackVideo] ) {
_sink->addTrackCompleted(); _sink->addTrackCompleted();
InfoL << "add track finished"; InfoL << "add track finished";
} }