diff --git a/src/Record/MP4Muxer.cpp b/src/Record/MP4Muxer.cpp index ffa3295f..8fd0567e 100644 --- a/src/Record/MP4Muxer.cpp +++ b/src/Record/MP4Muxer.cpp @@ -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()) {