From 07f3c6dde4cb4b8e68e1bce59e061ceb874823cb Mon Sep 17 00:00:00 2001 From: PioLing <964472638@qq.com> Date: Thu, 14 Dec 2023 14:14:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=88=9B=E5=BB=BA=E4=B8=8D?= =?UTF-8?q?=E6=94=AF=E6=8C=81codec=E7=9A=84frame=20(#3126)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Extension/Factory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Extension/Factory.cpp b/src/Extension/Factory.cpp index 9904a784..49feeb94 100644 --- a/src/Extension/Factory.cpp +++ b/src/Extension/Factory.cpp @@ -197,8 +197,8 @@ AMFValue Factory::getAmfByCodecId(CodecId codecId) { Frame::Ptr Factory::getFrameFromPtr(CodecId codec, const char *data, size_t bytes, uint64_t dts, uint64_t pts) { auto it = s_plugins.find(codec); if (it == s_plugins.end()) { - WarnL << "Unsupported codec: " << getCodecName(codec); - return nullptr; + // 创建不支持codec的frame + return std::make_shared(codec, (char *)data, bytes, dts, pts); } return it->second->getFrameFromPtr(data, bytes, dts, pts); }