兼容一些不规范的rtmp流

This commit is contained in:
xiongziliang 2020-08-01 10:17:54 +08:00
parent 4d82d0ffdf
commit fdbed9e83b
2 changed files with 2 additions and 2 deletions

View File

@ -80,7 +80,7 @@ public:
strong_self->onData(frame); strong_self->onData(frame);
} }
}); });
for (auto &track : _player->getTracks()) { for (auto &track : _player->getTracks(false)) {
track->addDelegate(delegate); track->addDelegate(delegate);
} }
} }

View File

@ -109,7 +109,7 @@ int main(int argc, char *argv[]) {
return; return;
} }
auto viedoTrack = strongPlayer->getTrack(TrackVideo); auto viedoTrack = strongPlayer->getTrack(TrackVideo, false);
if (!viedoTrack) { if (!viedoTrack) {
WarnL << "没有视频!"; WarnL << "没有视频!";
return; return;