Fix the issue where the hls-fmp4 do not flush data in single audio cases (#3935 #3937)
Some checks failed
Android / build (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Docker / build (push) Has been cancelled
Linux / build (push) Has been cancelled
macOS / build (push) Has been cancelled
Windows / build (push) Has been cancelled

This commit is contained in:
xiongguangjie 2024-09-29 11:55:58 +08:00 committed by GitHub
parent 87277ac91a
commit 6b2fcf7943
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -247,7 +247,8 @@ bool MP4MuxerMemory::inputFrame(const Frame::Ptr &frame) {
_key_frame = false;
}
if (frame->keyFrame()) {
// only audio all frame is key frame
if (frame->keyFrame() || !haveVideo()) {
_key_frame = true;
}
if (frame->getTrackType() == TrackVideo || !haveVideo()) {