Compare commits

...

2 Commits

Author SHA1 Message Date
xia-chu
17a43e6007 更新zltoolkit,优化负载均衡问题
Some checks are pending
Android / build (push) Waiting to run
CodeQL / Analyze (cpp) (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
Docker / build (push) Waiting to run
Linux / build (push) Waiting to run
macOS / build (push) Waiting to run
Windows / build (push) Waiting to run
2025-08-09 23:49:53 +08:00
yingxiaodong
98ac328318
BUG修正:多文件播放(loadMP4File)时,后续文件track_index对应错误 (#4386)
每个mp4文件的音视频的track_index不会完全一致,需要做对应处理。
2025-08-09 17:26:00 +08:00
2 changed files with 6 additions and 2 deletions

@ -1 +1 @@
Subproject commit 8f25d13f49e016858fae88f1045786ce26611873
Subproject commit b3ca2f7f57ac16bc91d763bb4257225cc9abbbd4

View File

@ -218,7 +218,10 @@ void MultiMP4Demuxer::openMP4(const string &files_string) {
CHECK(!_demuxers.empty());
_it = _demuxers.begin();
for (auto &track : _it->second->getTracks(false)) {
_tracks.emplace(track->getIndex(), track->clone());
auto clone_track(track->clone());
clone_track->setIndex(clone_track->getTrackType());
_tracks.emplace(clone_track->getIndex(), clone_track);
DebugL << "track index: " << track->getIndex() << " -> " << clone_track->getIndex();
}
}
@ -244,6 +247,7 @@ Frame::Ptr MultiMP4Demuxer::readFrame(bool &keyFrame, bool &eof) {
for (;;) {
auto ret = _it->second->readFrame(keyFrame, eof);
if (ret) {
ret->setIndex(ret->getTrackType());
auto it = _tracks.find(ret->getIndex());
if (it != _tracks.end()) {
auto ret2 = std::make_shared<FrameStamp>(ret);