From f32f5df4eb384de51ea3e9ef65ef4e3037ddd4ee Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Wed, 18 Dec 2019 18:40:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dmp4=E5=BD=95=E5=88=B6?= =?UTF-8?q?=E5=B4=A9=E6=BA=83=E7=9A=84bug:#181?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Record/MP4Muxer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Record/MP4Muxer.cpp b/src/Record/MP4Muxer.cpp index b1805db4..5d7c68e9 100644 --- a/src/Record/MP4Muxer.cpp +++ b/src/Record/MP4Muxer.cpp @@ -157,7 +157,7 @@ void MP4Muxer::addTrack(const Track::Ptr &track) { return; } - struct mpeg4_avc_t avc; + struct mpeg4_avc_t avc = {0}; string sps_pps = string("\x00\x00\x00\x01", 4) + h264_track->getSps() + string("\x00\x00\x00\x01", 4) + h264_track->getPps(); h264_annexbtomp4(&avc, sps_pps.data(), sps_pps.size(), NULL, 0, NULL, NULL); @@ -194,7 +194,7 @@ void MP4Muxer::addTrack(const Track::Ptr &track) { return; } - struct mpeg4_hevc_t hevc; + struct mpeg4_hevc_t hevc = {0}; string vps_sps_pps = string("\x00\x00\x00\x01", 4) + h265_track->getVps() + string("\x00\x00\x00\x01", 4) + h265_track->getSps() + string("\x00\x00\x00\x01", 4) + h265_track->getPps();