diff --git a/api/source/mk_player.cpp b/api/source/mk_player.cpp index a3dd4b9f..98bf6253 100755 --- a/api/source/mk_player.cpp +++ b/api/source/mk_player.cpp @@ -80,7 +80,7 @@ public: strong_self->onData(frame); } }); - for (auto &track : _player->getTracks()) { + for (auto &track : _player->getTracks(false)) { track->addDelegate(delegate); } } diff --git a/tests/test_player.cpp b/tests/test_player.cpp index 5417030d..f6ff3e78 100644 --- a/tests/test_player.cpp +++ b/tests/test_player.cpp @@ -109,7 +109,7 @@ int main(int argc, char *argv[]) { return; } - auto viedoTrack = strongPlayer->getTrack(TrackVideo); + auto viedoTrack = strongPlayer->getTrack(TrackVideo, false); if (!viedoTrack) { WarnL << "没有视频!"; return;