Compare commits

..

No commits in common. "8a27e11c4c267a65f60ecf1de9155570d4269ebd" and "aa56576b0e780bf609e9cfcbc27e36575204c4b9" have entirely different histories.

2 changed files with 5 additions and 8 deletions

View File

@ -178,9 +178,8 @@ RtmpCodec::Ptr Factory::getRtmpDecoderByTrack(const Track::Ptr &track) {
RtmpCodec::Ptr Factory::getRtmpEncoderByTrack(const Track::Ptr &track) {
auto it = s_plugins.find(track->getCodecId());
if (it == s_plugins.end()) {
auto amf = Factory::getAmfByCodecId(track->getCodecId());
WarnL << "Unsupported codec: " << track->getCodecName() << (amf ? ", use CommonRtmpEncoder" : "");
return amf ? std::make_shared<CommonRtmpEncoder>(track) : nullptr;
WarnL << "Unsupported codec: " << track->getCodecName() << ", use CommonRtmpEncoder";
return std::make_shared<CommonRtmpEncoder>(track);
}
return it->second->getRtmpEncoderByTrack(track);
}

View File

@ -91,11 +91,9 @@ void DecoderImp::onStream(int stream, int codecid, const void *extra, size_t byt
// G711传统只支持 8000/1/16的规格FFmpeg貌似做了扩展但是这里不管它了 [AUTO-TRANSLATED:851813f7]
// G711 traditionally only supports the 8000/1/16 specification. FFmpeg seems to have extended it, but we'll ignore that here.
auto codec = getCodecByMpegId(codecid);
if (codec != CodecInvalid) {
auto track = Factory::getTrackByCodecId(codec);
if (track) {
onTrack(stream, std::move(track));
}
auto track= Factory::getTrackByCodecId(codec);
if (track) {
onTrack(stream, std::move(track));
}
// 防止未获取视频track提前complete导致忽略后续视频的问题用于兼容一些不太规范的ps流 [AUTO-TRANSLATED:d6b349b5]
// Prevent the problem of ignoring subsequent video due to premature completion of the video track before it is obtained. This is used to be compatible with some non-standard PS streams.