From 0593f65fcb54ad7ab5a3687651a3b6fc3a0bd6fd Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Tue, 8 Jun 2021 14:50:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Rtmp/RtmpSession.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Rtmp/RtmpSession.cpp b/src/Rtmp/RtmpSession.cpp index a1e0caa9..b061cb29 100644 --- a/src/Rtmp/RtmpSession.cpp +++ b/src/Rtmp/RtmpSession.cpp @@ -463,10 +463,10 @@ void RtmpSession::onRtmpChunk(RtmpPacket::Ptr packet) { std::string type = dec.load(); if (type == "@setDataFrame") { setMetaData(dec); - } else if(type == "onMetaData"){ - //setMetaData(dec); - _publisher_metadata = dec.load(); - }else { + } else if (type == "onMetaData") { + //兼容某些不规范的推流器 + _publisher_metadata = dec.load(); + } else { TraceP(this) << "unknown notify:" << type; } break;