mirror of https://github.com/procxx/kepka.git
Fix memory leak in media streaming.
This commit is contained in:
parent
2d7f6fc2e7
commit
5f5d5629f8
|
@ -309,6 +309,7 @@ void File::Context::readNextPacket() {
|
||||||
if (i->second.size() == kMaxQueuedPackets) {
|
if (i->second.size() == kMaxQueuedPackets) {
|
||||||
processQueuedPackets(SleepPolicy::Allowed);
|
processQueuedPackets(SleepPolicy::Allowed);
|
||||||
}
|
}
|
||||||
|
Assert(i->second.size() < kMaxQueuedPackets);
|
||||||
} else {
|
} else {
|
||||||
// Still trying to read by drain.
|
// Still trying to read by drain.
|
||||||
Assert(result.is<FFmpeg::AvErrorWrap>());
|
Assert(result.is<FFmpeg::AvErrorWrap>());
|
||||||
|
|
|
@ -396,6 +396,8 @@ bool Player::fileProcessPackets(
|
||||||
videoReceivedTill(till);
|
videoReceivedTill(till);
|
||||||
});
|
});
|
||||||
_video->process(base::take(list));
|
_video->process(base::take(list));
|
||||||
|
} else {
|
||||||
|
list.clear(); // Free non-needed packets.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return fileReadMore();
|
return fileReadMore();
|
||||||
|
|
Loading…
Reference in New Issue