Compare commits

..

2 Commits

Author SHA1 Message Date
alex
f1c09a9ac0
Merge 90bd28249e into 6b2fcf7943 2024-09-29 15:30:14 +08:00
xiongguangjie
6b2fcf7943
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
2024-09-29 11:55:58 +08:00

View File

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