From fcbcc81c188d27017258271705581883080119a6 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Fri, 26 Oct 2018 18:12:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dsdp=20=E7=9B=B8=E5=85=B3bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/RtspMuxer/RtspSdp.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/RtspMuxer/RtspSdp.h b/src/RtspMuxer/RtspSdp.h index 088287bb..78e49ae2 100644 --- a/src/RtspMuxer/RtspSdp.h +++ b/src/RtspMuxer/RtspSdp.h @@ -153,9 +153,11 @@ public: _printer << "a=fmtp:" << playload_type << " packetization-mode=1;profile-level-id="; char strTemp[100]; - int profile_level_id = 0; + uint32_t profile_level_id = 0; if (strSPS.length() >= 4) { // sanity check - profile_level_id = (strSPS[1] << 16) | (strSPS[2] << 8) | strSPS[3]; // profile_idc|constraint_setN_flag|level_idc + profile_level_id = (uint8_t(strSPS[1]) << 16) | + (uint8_t(strSPS[2]) << 8) | + (uint8_t(strSPS[3])); // profile_idc|constraint_setN_flag|level_idc } memset(strTemp, 0, 100); sprintf(strTemp, "%06X", profile_level_id);