Compare commits

...

5 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
alex
90bd28249e Translate comments in src/Common/MediaSink.cpp 2024-09-21 09:44:57 +08:00
alex
c3106d514a Translate comments in src/Common/MediaSink.cpp 2024-09-21 09:26:48 +08:00
alex
f03d414e82 Translate comments in src/Common/MediaSink.cpp 2024-09-21 09:26:17 +08:00
2 changed files with 6 additions and 3 deletions

View File

@ -114,12 +114,14 @@ void MediaSink::checkTrackIfReady() {
} }
} }
// 等待音频超时时间 // 等待音频超时时间 [AUTO-TRANSLATED:5ec16b26]
// Wait for audio timeout time
GET_CONFIG(uint32_t, kWaitAudioTrackDataMS, General::kWaitAudioTrackDataMS); GET_CONFIG(uint32_t, kWaitAudioTrackDataMS, General::kWaitAudioTrackDataMS);
if (_max_track_size > 1) { if (_max_track_size > 1) {
for (auto it = _track_map.begin(); it != _track_map.end();) { for (auto it = _track_map.begin(); it != _track_map.end();) {
if (it->second.first->getTrackType() == TrackAudio && _ticker.elapsedTime() > kWaitAudioTrackDataMS && !it->second.second) { if (it->second.first->getTrackType() == TrackAudio && _ticker.elapsedTime() > kWaitAudioTrackDataMS && !it->second.second) {
// 音频超时且完全没收到音频数据,忽略音频 // 音频超时且完全没收到音频数据,忽略音频 [AUTO-TRANSLATED:0d0fbb13]
// Audio timeout and did not receive any audio data, ignore audio
auto index = it->second.first->getIndex(); auto index = it->second.first->getIndex();
WarnL << "Audio track index " << index << " codec " << it->second.first->getCodecName() << " receive no data for long " WarnL << "Audio track index " << index << " codec " << it->second.first->getCodecName() << " receive no data for long "
<< _ticker.elapsedTime() << "ms. Ignore it!"; << _ticker.elapsedTime() << "ms. Ignore it!";

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()) {